Sunday, November 14, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


mount: unknown filesystem type 'btrfs'

Posted: 14 Nov 2021 12:25 PM PST

I have a Raspberry Pi running Raspbian with a btrfs partition on an external drive. The system is configured to install security updates automatically, but not other updates.

All of a sudden, upon rebooting the system, the btrfs partition no longer mounts. When I try to mount it manually, I get:

mount: unknown filesystem type 'btrfs'  

Some sources on the net suggested running modprobe to ensure btrfs support is installed. modprobe btrfs results in:

modprobe: ERROR: could not insert 'btrfs': Exec format error  

What's wrong here? What can I do to diagnose the issue and fix it?

ntp server reachable but never select/set the time

Posted: 14 Nov 2021 12:01 PM PST

We have some embedded devices using ntpd(4.2.8p10) to sync the time. One of our customers is using their own ntp server inside an internal network. From the ntpd -dgq debug mode, we found the server is reachable and we can get the offset, delay and jitter info. However, the ntpd will only exit with"ntpd: no servers found" and never select and set the local time.


2 Nov 11:57:05 ntpd[20218]: ntpd 4.2.8p10@1.3728-o Thu Jul 26 19:52:20 UTC 2018 (2): Starting  2 Nov 11:57:05 ntpd[20218]: Command line: ntpd -dgq  2 Nov 11:57:05 ntpd[20218]: proto: precision = 2.000 usec (-19)  Finished Parsing!!  restrict: op 1 addr 0.0.0.0 mask 0.0.0.0 mflags 00000000 flags 000005f0  restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00000000 flags 00000000  restrict source template mflags 4000 flags 1c0  restrict: op 1 addr (null) mask (null) mflags 00004000 flags 000001c0  move_fd: estimated max descriptors: 1024, initial socket boundary: 16  2 Nov 11:57:05 ntpd[20218]: Listen and drop on 0 v4wildcard 0.0.0.0:123  2 Nov 11:57:05 ntpd[20218]: Listen normally on 1 lo 127.0.0.1:123  restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00003000 flags 00000001  2 Nov 11:57:05 ntpd[20218]: Listen normally on 2 eth1 192.168.168.109:123  restrict: op 1 addr 192.168.168.109 mask 255.255.255.255 mflags 00003000 flags 00000001  2 Nov 11:57:05 ntpd[20218]: Listen normally on 3 wlan0 192.168.100.1:123  restrict: op 1 addr 192.168.100.1 mask 255.255.255.255 mflags 00003000 flags 00000001  2 Nov 11:57:05 ntpd[20218]: Listening on routing socket on fd #27 for interface updates  key_expire: at 0 associd 60163  peer_clear: at 0 next 1 associd 60163 refid INIT  restrict: op 1 addr 10.160.129.161 mask 255.255.255.255 mflags 00004000 flags 000001c0  restrict_source: 10.160.129.161 host restriction added  event at 0 10.160.129.161 8011 81 mobilize assoc 60163  newpeer: 192.168.168.109->10.160.129.161 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000  event at 0 0.0.0.0 c016 06 restart  peer_xmit: at 1 192.168.168.109->10.160.129.161 mode 3 len 48 xmt 0xe52bde52.ddf3c87c  auth_agekeys: at 1 keys 0 expired 0  event at 1 10.160.129.161 8014 84 reachable  clock_filter: n 1 off 30.082946 del 0.048598 dsp 7.945314 jit 0.000002  peer_xmit: at 3 192.168.168.109->10.160.129.161 mode 3 len 48 xmt 0xe52bde54.ddf0a416  clock_filter: n 2 off 30.083616 del 0.047583 dsp 3.949228 jit 0.000670  peer_xmit: at 5 192.168.168.109->10.160.129.161 mode 3 len 48 xmt 0xe52bde56.dde968ab  clock_filter: n 3 off 30.078398 del 0.054469 dsp 1.951189 jit 0.004895  peer_xmit: at 7 192.168.168.109->10.160.129.161 mode 3 len 48 xmt 0xe52bde58.dde80026  clock_filter: n 4 off 30.079499 del 0.074539 dsp 0.952172 jit 0.003164  peer_xmit: at 9 192.168.168.109->10.160.129.161 mode 3 len 48 xmt 0xe52bde5a.ddea03c8  clock_filter: n 5 off 30.083616 del 0.044472 dsp 0.452664 jit 0.003340  2 Nov 11:57:16 ntpd[20218]: ntpd: no servers found  END OF FILE  

Also, when running ntpd in the background and using ntpq -p to query the ntpd status. We get the following result, the st, delay, offset and reach seem fine.

enter image description here
However, the ntpd never select the ntp server as the time source(never show "*" or "+" before the remote address ) and sets the local time after a long time of waiting.


I looked into the source code. When using ntpdate(-q) mode the ntpd will exit after doing all bursts for every server when there is no clock selected/ set

    } else {          peer->burst--;          if (peer->burst == 0) {                /*               * If ntpdate mode and the clock has not been               * set and all peers have completed the burst,               * we declare a successful failure.               */              if (mode_ntpdate) {                  peer_ntpdate--;                  if (peer_ntpdate == 0) {                      msyslog(LOG_NOTICE,                          "ntpd: no servers found");                      if (!msyslog_term)                          printf(                              "ntpd: no servers found\n");                      exit (0);                  }              }          }      }  

However, I am still not understand why ntpd didn't select and set a time form the server. Thanks for your help in advance.

Why a bash array remains empty if I pipe the result of a for loop, used to populate it, into zenity --progress?

Posted: 14 Nov 2021 11:47 AM PST

I have an array with some data:

array1=( AAA BBB CCC DDD )

I want to populate an array of results from calling a certain API with the data in array1 and at the same time I want to show the progress with zenity. So I though about doing this:

i=0  prog=0    for c in ${array1[@]}; do    echo $prog  #updates the text    echo "# $c" #updates the percentage      data_array[$i]=$(curl -s "https://hub.dummyapis.com/products?noofRecords=4&idStarts=1001&useless=$c" | jq .[$i].id | bc)      (( prog=prog+30 ))    (( i++ ))  done | zenity \      --progress \      --title="Title" \      --text="Text" \      --percentage=0 \      --auto-close \      --auto-kill  

The problem is that the data_array remains empty.

On the other hand, it gets populated if I omit the pipe to the zenity command. If I understood correctly, it's because the pipe it's spawning a new subprocess, thus the data_array is empty there.

I also tried using this sintax, but with same results:

zenity \      --progress \      --title="Title" \      --text="Text" \      --percentage=0 \      --auto-close \      --auto-kill < <(  for c in ${array1[@]}; do    echo $prog    echo "# $c"      data_array[$i]=$(curl -s "https://hub.dummyapis.com/products?noofRecords=4&idStarts=1001&useless=$c" | jq .[$i].id | bc)      (( prog=prog+30 ))    (( i++ ))  done)  

What can I do?

Screen going black in debian after using wine or java

Posted: 14 Nov 2021 11:39 AM PST

It all started when I switched graphics drivers for nvidia. I have never had this issue before until now lol. I use Debian 11 with an nvidia gt 1030 gpu. It all fixes when I restart my tv/monitor, however it gets annoying and I just want this to be fixed lol. I am sure theres other things that trigger it but I am not so sure what.

Multiple sudo -S in one command problem

Posted: 14 Nov 2021 11:24 AM PST

I wonder how can I perform that command without inputing manually the password:

echo "password" | sudo -S curl https://cli-assets.heroku.com/install.sh | sudo -S sh  

Currently it still asks me for password, how to solve that?

Thank you in advance!

How to get qemu .cow2 actual file size

Posted: 14 Nov 2021 11:27 AM PST

qcow2 disk images can grow as data is added. This allows for smaller file sizes which is great, but how can I get actual size of the file system in order to define the disk size when adding it to virtual machine?

Change PDF page size without re-scaling a content (CLI)

Posted: 14 Nov 2021 11:10 AM PST

Question

I have a PDF with a non-standard page size. I would like to change PDF canvas size to A4 without re-scaling the content.

I can receive the expected result with Printing to PDF (picture below, original content is a black rectangle). However, I would like to achieve the same result using Linux CLI. What I would like to receive

How can I change PDF page size without rescaling the content, using the Linux command line?

Investigation

I have tried to use pdfjam: pdfjam --outfile out.pdf --paper a4paper in.pdf. Unfortunately, it scales to fit in.pdf and thats unacceptable for me.

Also I tried cpdf: cpdf -scale-page a4portrait in.pdf -o out.pdf scales content to the page size.

Moreover, found PdfScale. However it can only scale content or change page size with fitting the content.

The similar problem has been described here, but the author used GUI application (not CLI)

Lightweight Modern Distro for Atom Machine?

Posted: 14 Nov 2021 11:02 AM PST

With all the distros out there, I'm not up to date on which does what. I have an old Atom D2500 box that I want to get going. It's currently running CentOS8 but that lineage is terminated. So I've been researching options and tried Puppy OS, which can't even install from the ISO image. Oh well.

Anybody have any recommendations? I'm looking for small, lightweight, where I can install modern Ruby, gems, etc.

Any insight appreciated. Cheers.

Does the Dell Universal Receiver work on Jetson Nano?

Posted: 14 Nov 2021 10:33 AM PST

According to this question on AskUbuntu, Is the Dell Universal Pairing USB receiver supported?, the Dell Universal Receiver works on PCs running Ubuntu (since at least 18.04) - apparently, only after the dongle has first been paired up with the keyboard and mouse on either a Mac or PC running Windows.

Seeing as the OS used by the Jetson Nano (Linux4Tegra) is based upon Ubuntu 18.04:

NVIDIA® Jetson™ Linux Driver Package (L4T) is the board support package for Jetson. It includes Linux Kernel 4.9, bootloader, NVIDIA drivers, flashing utilities, sample filesystem based on Ubuntu 18.04, and more for the Jetson platform.

does that mean the Dell Universal Receiver works (assuming it has already been paired), on the Jetson Nano, or have those drivers not (yet) been ported, seeing as the Jetson Nano is based on ARM and not x64?

There are reports, on the Jetson Developer forums, of the Logitech Unifying Receiver working on the Jetson Nano, see Can Jetson Nano connect with wireless keyboard and wireless mouse via usb? but no reports about the Dell receiver. However, the Dell receiver is not the same beast, nor is it a branded/repackaged dongle, so the drivers may not be the same, nor be already ported/supported.

Does anyone have first hand experience of the Dell Universal Receiver up and working, on a Jetson Nano?


Note that I have already asked this question on AskUbuntu, but it was closed for not being "Ubuntu enough", i.e. Linux4Tegra isn't an officially support Ubuntu product. Hopefully it is more au point on here..?

How to check arguments given to a bash script efficiently?

Posted: 14 Nov 2021 11:43 AM PST

I wrote a bash script but since I'm a self-learner bash rookie, I wanted to ask if I can check the given arguments more efficiently. I also googled about this and checked topics here but the examples I have seen so far are too complicated. In python3, there are a lot easier methods for this but I guess in bash it is a bit more complex.

#!/bin/bash    ERR_MSG="You did not give the argument required"    if [[ ${1?$ERR_MSG} == "a" ]]; then          echo "ABC"  elif [[ ${1?$ERR_MSG} == "b" ]]; then          echo "123"  elif [[ ${1?$ERR_MSG} == "c" ]]; then          echo ".*?"  else      echo "You did not provide the argument correctly"      exit 1  fi  

reading filenames with newlines

Posted: 14 Nov 2021 10:17 AM PST

Now we're all familiar with not using:

find . -print | xargs cmd  

but using

find . -print0 | xargs -0 cmd  

To cope with filenames containing e.g. newline, but what about a line I have in a script:

find $@ -type f -print | while read  filename  

Well, I assumed it would be something like:

find $@ -type f -print0 | while read -d"\0" filename  

And if I'd simply done:

 find $@ -type f -print0 | while read filename  

I'd be seeing the NULLs?

But No, the while loop exits after zero times around (in both cases) I assume because the read returned zero, also I assume because it read a NULL (\0) .

Feels like the bash read should sport a "-0" option.

Have I misread what's happening or is there a different way to frame this?

For this example I may well have to recode to use xargs but that's a whole heap of new processes I didn't want to fork.

Extremely slow booting time in Linux Lite since yesterday (Over 5 minutes), what should I do?

Posted: 14 Nov 2021 10:11 AM PST

Here are the details:

systemd-analyze

Startup finished in 6.345s (kernel) + 5min 17.341s (userspace) = 5min23.687s    graphical.target reached after 5min 17.322s in userspace  

here's what I get with: sudo systemd-analyze blame https://pastebin.com/y6WZEgCd

And critical-chain:

sudo systemd-analyze critical-chain  The time when unit became active or started is printed after the "@" character.  The time the unit took to start is printed after the "+" character.    graphical.target @5min 17.322s  └─multi-user.target @5min 17.322s    └─smbd.service @5min 13.903s +3.418s      └─nmbd.service @5min 8.603s +5.297s        └─network-online.target @5min 8.599s          └─network.target @5min 8.599s            └─networking.service @3min 8.629s +1min 59.968s              └─apparmor.service @1min 37.629s +2.335s                └─systemd-journald.socket @7.589s                  └─-.mount @7.585s                    └─system.slice @7.585s                      └─-.slice @7.585s  

Uploading files, some of which are directories, into an empty GitHub repository

Posted: 14 Nov 2021 10:27 AM PST

I have created a program in my personal computer and I want to upload all its files into an empty GitHub repository.

I cannot do so from GitHub GUI because some of these files are directories and currently GitHub GUI rejects uploading directories.

Could I use Git to upload these files, perhaps by a "pull request" to the empty GitHub repository (which I would later approve from GitHub GUI)?

I would prefer a solution without SSH.

What's all about the process of invoking a file with a mouse click in ubuntu (generally in Linux)?

Posted: 14 Nov 2021 11:40 AM PST

First of all, I apologize for the beginner's question. I still can't think of what's going on in the system (Ubuntu 21.10) after, for example, I click on the "Files" icon and then on a file. What does the process of invoking a file with a mouse click associated with, for example, gedit or invoking a directory or just any program actually contain? Is it written somewhere like in /proc/bus/input/devices Ev = ..., what happens to the keyboard?

How to get IP addr from MAC

Posted: 14 Nov 2021 11:37 AM PST

I'm trying to connect to a second-hand external wifi camera. It has an ethernet slot and a sticker with the MAC address but no other branding or model/serial numbers.

I am trying to find its IP address.

My current plan is to connect an ethernet cable directly between my machine and this camera, then scan all reserved private IPv4 ranges with nmap:

ip addr add 10.0.0.1/8 dev eno2  ip addr add 172.16.0.1/12 dev eno2  ip addr add 192.168.0.1/16 dev eno2    nmap -sn 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8  

But this could take a long time (I'm guessing about 74 hours) and I can't be sure that this device isn't using IPv6. Is there a better solution?

wc command with no FILE argument (reading from standard input)

Posted: 14 Nov 2021 12:00 PM PST

Regarding wc (word count) command... I am trying to understand the following (from man wc which I have quoted below plus added a longer quote at end of my question)

With no FILE, or when FILE is -, read standard input.

How exactly does this work? At what point do I type the "standard input"?

Finding explanations online rather confusing. Maybe I am just missing some basic info regarding what exactly stdin is.

From man wc

SYNOPSIS        wc [OPTION]... [FILE]... wc [OPTION]... --files0-from=F             DESCRIPTION        Print newline, word, and byte counts for each FILE, and a total       line if more than one FILE is specified. A word is a       non-zero-length sequence of characters delimited by white space.                  With no FILE, or when FILE is -, read standard input.  

Run command every time regex is matched, reading from stdin which does not have an EOF

Posted: 14 Nov 2021 10:56 AM PST

I am attempting to write a BASH script that creates a timestamp (to be written to file) every time a certain string is found within the output of dbus-monitor (parameters specified later in post). The main purpose of my script is to save the time (including milliseconds) and date whenever a song starts playing on Spotify, as it utilizes notifications.

The following command outputs string "Spotify" whenever a song beings playing.

dbus-monitor --session interface='org.freedesktop.Notifications',member='Notify' | grep 'string "Spotify"'  

My attempt:

search='string "Spotify"'  found=$(dbus-monitor --session interface='org.freedesktop.Notifications',member='Notify' | grep 'string "Spotify"')    while [ ${search} == ${found} ]; do      date -u +%Y%M%d-%H%M%S.%N >> timestamp.txt  done  

I am assuming the reason of my code's dysfunction is that dbus-monitor continuously runs, therefore preventing the while loop from executing.

How to iterate through all text video sound and image files by content type regardless extension

Posted: 14 Nov 2021 10:13 AM PST

I want to use 4 for cycles for each category text (included code script and src files), video, sound and image files.

Checking the extesion explicitly to perform the check with something like

for i in *.ext1 *.ext2 *.ext...  

requires me to specify every extension possible for each category, and I'm looking for an alternative way.

Run shell script when Caps Lock is pressed (on Wayland)

Posted: 14 Nov 2021 11:05 AM PST

I'm trying to get my head around shell scripting to solve a minor Wayland/Mutter bug that hasn't been addressed in over two years. I'm completely unfamiliar with shell scripting, but I think this should be possible.

The problem is that on Wayland the xkb option to indicate keyboard layouts with a LED doesn't work correctly. It works on first layout switch, turning the LED on, but then stops working, leaving the LED always on.

So my idea is to have a script that would check for the contents of the system LED file upon pressing a particular key (CapsLock in my case), and change it to the opposite value. The logic would be as follows:

listen to CapsLock and upon keypress    do cat /sys/class/leds/input7::capslock/brightness  if cat returns 0    then echo 1 > /sys/class/leds/input7::capslock/brightness  if cat returns 1    then echo 0 > /sys/class/leds/input7::capslock/brightness  wait for next CapsLock keypress  

I'm good at learning stuff from examples, but I couldn't find relevant info online. I guess I just don't know how to phrase this correctly to get relevant results. So any tips and pointers in the right direction greatly appreciated!

UPD:
I got as far as creating the shell script that switches the LED on and off depending on the current state of the LED. How do I make it execute every time CapsLock is pressed?

#!/bin/bash    led=`cat /sys/class/leds/input7::capslock/brightness`    if [[ $led = "1" ]]  then      echo 0 > /sys/class/leds/input7::capslock/brightness  else      echo 1 > /sys/class/leds/input7::capslock/brightness  fi  

UPD2:
I obviously made the shell script executable, moved it to /usr/local/bin/, and added it to a file in /etc/sudoers.d/ to allow it to run without a password.

UPD3
I noticed that the ìnput number in the directory structure can change between reboots, so I modified the script to account for that.

#!/bin/bash    led=`cat /sys/class/leds/input?::capslock/brightness`  file=`ls /sys/class/leds/input?::capslock/brightness`    if [[ $led = "1" ]]  then      echo 0 > $file  else      echo 1 > $file  fi  

Now I need to execute this every time Caps Lock is pressed.

Append text on lines NOT matching pattern

Posted: 14 Nov 2021 11:07 AM PST

INSERT INTO `db`.`table`  VALUES (   39741633   49302045   0   44    '{"CustomerName":"S","CustomerMobile":"8","CustomerEmail":"","VersionId":"5","CityId":"2","CampaignId":"1","InquirySourceId":"3","Eagerness":"-1","ApplicationId":"2","BranchId":"3","AssignedDealerId":"2","DMSInqNo":"45"}'    NULL    0    '2021-11-09 19:11:50'    NULL    1    29    NULL  );  INSERT INTO `db`.`table`  VALUES (   39741635   49970365   0   30    '{"CustomerName":"A","CustomerEmail":"As@gmail.com","CustomerMobile":"9","VersionId":"6","InquirySourceId":"1","Eagerness":"-1","IsCorporate":"z","CampaignId":"8","BranchId":"3","ApplicationId":"1","Location":{"City":{"CityId":"1"},"Area":{"AreaId":"4"}},"CouponCode":null,"CwOfferId":"0","AssignedDealerId":"0","PinCode":""}'    NULL    0    '2021-11-09 19:11:51'    NULL    1    29    NULL  );  

I have these insert statements extracted out of binlogs. They were not exactly like this, I have changed them a little, but I am stuck. I need to convert them into actual insert statements. If you see I need to add commas at end of each line after the second line (INSERT INTO db.table VALUES (), for each insert statement. That means add commas after two lines till 11 lines, then again start after INSERT INTO and repeat.

I tried to google and found this

sed '/INSERT/{n;n;n;n;n;s/$/,/}' teststring.txt --> this will put comma on fifth line after insert. The problem is if I run it again for the sixth line

sed '/INSERT/{n;n;n;n;n;n;s/$/,/}' teststring.txt , then it replaces the earlier comma placed by the first SED command

This is how the file should look.

INSERT INTO `db`.`table`  VALUES (   39741633,   49302045,   0,   44,   '{"CustomerName":"S","CustomerMobile":"8","CustomerEmail":"","VersionId":"5","CityId":"2","CampaignId":"1","InquirySourceId":"3","Eagerness":"-1","ApplicationId":"2","BranchId":"3","AssignedDealerId":"2","DMSInqNo":"45"}',    NULL,    0,    '2021-11-09 19:11:50',    NULL,    1,    29,    NULL  );  INSERT INTO `db`.`table`  VALUES (   39741635,   49970365,   0,   30,    '{"CustomerName":"A","CustomerEmail":"As@gmail.com","CustomerMobile":"9","VersionId":"6","InquirySourceId":"1","Eagerness":"-1","IsCorporate":"z","CampaignId":"8","BranchId":"3","ApplicationId":"1","Location":{"City":{"CityId":"1"},"Area":{"AreaId":"4"}},"CouponCode":null,"CwOfferId":"0","AssignedDealerId":"0","PinCode":""}',    NULL,    0,    '2021-11-09 19:11:51',    NULL,    1,    29,    NULL  );  

How can I achieve this?

Annotate series of pdf documents with page counter

Posted: 14 Nov 2021 10:27 AM PST

The goal is to enumerate a set of .pdf files using command line tools. Ideally a free open source package would lend itself to performing the enumeration tasks on both Catalina and Ubuntu 20.04.

Assume a set of files:

  1. file1.pdf
  2. file2.pdf
  3. file3.pdf

Algorithm:

  1. Initialize the counter to 100 only once: do not reset ever to 100
  2. Starting with the first page of file1.pdf:
  3. Enumerate (stamp) the bottom right corner with "myText [counter]"
  4. increment the counter and stamp the next page
  5. if the last page of the file has been enumerated, repeat the process with the next file until all pages of all files are enumerated. The next file shall continue using the same counter, which will NOT be reset to 100.

Solutions / examples to accomplish the goal are appreciated.

CLARIFICATION:

All pages shall have a unique page numbers: If each document has 10 pages, then the last page number will be 129.

GRUB not timing out or recognizing laptop keyboard (only) on reboot [ARCH]

Posted: 14 Nov 2021 10:22 AM PST

Problem

GRUB doesn't automatically timeout or recognize laptop's keyboard on reboot but works fine on a normal boot (with a shutdown). When stuck on reboot, I need to manually poweroff my laptop with the power button. The peculiar thing is that even though GRUB never times out on reboot, it intermittently recognizes external wireless keyboard and not the laptop's internal one.

Any help is highly appreciated!!

Current Setup

  • Lenovo Z580 (I5 3rd Gen, 8GB/SSD)
  • Trying newer ISO for installation
    • Previously used 10-2021 ISO
    • Now used 11-2021 ISO
  • UEFI dual boot with Arch & Win10
  • GRUB Version 2.06
  • SecureBoot and FastBoot are disabled
  • GRUB_TIMEOUT is set to 10

Steps Tried

  • Regenerating grub.cfg
  • Installing LTS kernel
  • Disconnecting all USB peripherals
  • Setting RebootWatchdogSec=0 in /etc/systemd/system.conf
    • Used to get watchdog didn't stop message on reboot. Referred this.
    • Reverted the change
  • journalctl -b 1 (systemd) logs don't seem to show any error related to this
  • Reinstalling GRUB
    • Uninstalled grub package
    • Deleted /boot/grub/ directory
    • Deleted grub's dir. in ESP
    • Reinstalled grub package
    • Ran grub-install and grub-mkconfig
  • Downgrading GRUB
    • Installed GRUB 2.04-6 from Arch Linux Archive
    • Problem persisted (reboot only)
  • Setting Windows to use UTC BIOS Time, as a possible-solution mentioned here

Observation

  • The problem occurs even if no DE is installed
    • Tried on a clean install
  • The problem doesn't occur on Fedora or Debian (installed each individually)

Mute all microphons with one command

Posted: 14 Nov 2021 11:01 AM PST

I am running Linux Mint 19.1 and would like to assign a shortcut key to a script that mutes and unmutes my microphones. I have found many solutions that do this for a single input, e.g.

amixer set Capture toggle  pactl set-source-mute $source_number toggle  

However, as I switch between different inputs (built in mic, bluetooth headset, wired headset), I would prefer something that consistently toggles ALL of these on/off together. This means that they are either all on or all off, no risk of one being on while another is off.
I am unsure weather or not the assigned source numbers in pactl are constant or not and would like a solution that will work reliably, independent of if I reconnect the mic 42 times or even connect a different (bluetooth) device.

Is there a command to get the source used by the system (the one that same as system refers to in a number of applications, e.g. Zoom)?
If so, when I run the command/script I would like to get the state of that device and set the state of all the relevant devices to the opposite state.

Any suggestions for how I can do this?

Connecting to L2TP over IPSec VPN fails with fatal signal 15

Posted: 14 Nov 2021 10:08 AM PST

I have Debian 10 Buster with KDE Plasma 5.14.5 and kernel 5.6.0-0.bpo.2-amd64. I am trying to connect to VPN L2TP over IPSec. However, when I try to connect, an error occurs with no apparent reason. It states that fatal signal 15 has occured, but no additional information is given:

Aug  3 15:22:53 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: death_handler: Fatal signal 15 received  

I would really appreciate some help with the matter.

/var/log/syslog:

Aug  3 15:22:35 ComputerOfLiza NetworkManager[627]: <info>  [1596457355.6103] audit: op="connection-activate" uuid="8313482f-d2cd-4e39-a18c-86b540d6a8e3" name="Work" pid=990 uid=1000 result="success"  Aug  3 15:22:35 ComputerOfLiza NetworkManager[627]: <info>  [1596457355.6209] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: Started the VPN service, PID 1922  Aug  3 15:22:35 ComputerOfLiza NetworkManager[627]: <info>  [1596457355.6283] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: Saw the service appear; activating connectio  n  Aug  3 15:22:35 ComputerOfLiza NetworkManager[627]: <info>  [1596457355.6332] audit: op="statistics" arg="refresh-rate-ms" pid=990 uid=1000 result="success"  Aug  3 15:22:35 ComputerOfLiza nm-l2tp-service[1922]: Check port 1701  Aug  3 15:22:35 ComputerOfLiza nm-l2tp-service[1922]: Can't bind to port 1701  Aug  3 15:22:35 ComputerOfLiza NetworkManager[1941]: Stopping strongSwan IPsec...  Aug  3 15:22:35 ComputerOfLiza charon: 00[DMN] signal of type SIGINT received. Shutting down  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[DMN] Starting IKE charon daemon (strongSwan 5.7.2, Linux 5.6.0-0.bpo.2-amd64, x86_64)  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading crls from '/etc/ipsec.d/crls'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] loading secrets from '/etc/ipsec.secrets'  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] expanding file expression '/var/lib/strongswan/ipsec.secrets.inc' failed  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[CFG] expanding file expression '/etc/ipsec.d/*.secrets' failed  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[LIB] loaded plugins: charon aesni aes rc2 sha2 sha1 md5 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pe  m openssl fips-prf gmp agent xcbc hmac gcm attr kernel-netlink resolve socket-default connmark stroke updown counters  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[LIB] dropped capabilities, running as uid 0, gid 0  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[JOB] spawning 16 worker threads  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 08[KNL] interface wlp0s20f3 deactivated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 12[KNL] interface wlp0s20f3 activated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 08[KNL] interface wlp0s20f3 deactivated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 12[KNL] interface wlp0s20f3 activated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 13[KNL] interface wlp0s20f3 deactivated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 06[KNL] interface wlp0s20f3 activated  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 07[KNL] fe80::42e7:d46c:adef:f62f appeared on wlp0s20f3  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 13[KNL] 192.168.1.38 appeared on wlp0s20f3  Aug  3 15:22:35 ComputerOfLiza ipsec[822]: 00[DMN] signal of type SIGINT received. Shutting down  Aug  3 15:22:35 ComputerOfLiza ipsec[796]: charon stopped after 200 ms  Aug  3 15:22:35 ComputerOfLiza ipsec[796]: ipsec starter stopped  Aug  3 15:22:35 ComputerOfLiza systemd[1]: strongswan.service: Succeeded.  Aug  3 15:22:37 ComputerOfLiza NetworkManager[1938]: Starting strongSwan 5.7.2 IPsec [starter]...  Aug  3 15:22:37 ComputerOfLiza NetworkManager[1938]: Loading config setup  Aug  3 15:22:37 ComputerOfLiza NetworkManager[1938]: Loading conn '8313482f-d2cd-4e39-a18c-86b540d6a8e3'  Aug  3 15:22:37 ComputerOfLiza NetworkManager[1938]: found netkey IPsec stack  Aug  3 15:22:37 ComputerOfLiza charon: 00[DMN] Starting IKE charon daemon (strongSwan 5.7.2, Linux 5.6.0-0.bpo.2-amd64, x86_64)  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading crls from '/etc/ipsec.d/crls'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading secrets from '/etc/ipsec.secrets'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] expanding file expression '/var/lib/strongswan/ipsec.secrets.inc' failed  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG] loading secrets from '/etc/ipsec.d/nm-l2tp-ipsec-8313482f-d2cd-4e39-a18c-86b540d6a8e3.secrets'  Aug  3 15:22:37 ComputerOfLiza charon: 00[CFG]   loaded IKE secret for %any  Aug  3 15:22:37 ComputerOfLiza charon: 00[LIB] loaded plugins: charon aesni aes rc2 sha2 sha1 md5 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac gcm attr kernel-netlink resolve socket-default connmark stroke updown counters  Aug  3 15:22:37 ComputerOfLiza charon: 00[LIB] dropped capabilities, running as uid 0, gid 0  Aug  3 15:22:37 ComputerOfLiza charon: 00[JOB] spawning 16 worker threads  Aug  3 15:22:37 ComputerOfLiza charon: 05[CFG] received stroke: add connection '8313482f-d2cd-4e39-a18c-86b540d6a8e3'  Aug  3 15:22:37 ComputerOfLiza charon: 05[CFG] added configuration '8313482f-d2cd-4e39-a18c-86b540d6a8e3'  Aug  3 15:22:38 ComputerOfLiza charon: 09[CFG] rereading secrets  Aug  3 15:22:38 ComputerOfLiza charon: 09[CFG] loading secrets from '/etc/ipsec.secrets'  Aug  3 15:22:38 ComputerOfLiza charon: 09[CFG] expanding file expression '/var/lib/strongswan/ipsec.secrets.inc' failed  Aug  3 15:22:38 ComputerOfLiza charon: 09[CFG] loading secrets from '/etc/ipsec.d/nm-l2tp-ipsec-8313482f-d2cd-4e39-a18c-86b540d6a8e3.secrets'  Aug  3 15:22:38 ComputerOfLiza charon: 09[CFG]   loaded IKE secret for %any  Aug  3 15:22:38 ComputerOfLiza charon: 08[CFG] received stroke: initiate '8313482f-d2cd-4e39-a18c-86b540d6a8e3'  Aug  3 15:22:38 ComputerOfLiza charon: 11[IKE] initiating Main Mode IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1] to 77.234.209.75  Aug  3 15:22:38 ComputerOfLiza charon: 11[ENC] generating ID_PROT request 0 [ SA V V V V V ]  Aug  3 15:22:38 ComputerOfLiza charon: 11[NET] sending packet: from 192.168.1.38[500] to 77.234.209.75[500] (176 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 12[NET] received packet: from 77.234.209.75[500] to 192.168.1.38[500] (156 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 12[ENC] parsed ID_PROT response 0 [ SA V V V V ]  Aug  3 15:22:38 ComputerOfLiza charon: 12[IKE] received NAT-T (RFC 3947) vendor ID  Aug  3 15:22:38 ComputerOfLiza charon: 12[IKE] received XAuth vendor ID  Aug  3 15:22:38 ComputerOfLiza charon: 12[IKE] received DPD vendor ID  Aug  3 15:22:38 ComputerOfLiza charon: 12[IKE] received FRAGMENTATION vendor ID  Aug  3 15:22:38 ComputerOfLiza charon: 12[CFG] selected proposal: IKE:3DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024  Aug  3 15:22:38 ComputerOfLiza charon: 12[ENC] generating ID_PROT request 0 [ KE No NAT-D NAT-D ]  Aug  3 15:22:38 ComputerOfLiza charon: 12[NET] sending packet: from 192.168.1.38[500] to 77.234.209.75[500] (244 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 13[NET] received packet: from 77.234.209.75[500] to 192.168.1.38[500] (236 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 13[ENC] parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]  Aug  3 15:22:38 ComputerOfLiza charon: 13[IKE] local host is behind NAT, sending keep alives  Aug  3 15:22:38 ComputerOfLiza charon: 13[ENC] generating ID_PROT request 0 [ ID HASH ]  Aug  3 15:22:38 ComputerOfLiza charon: 13[NET] sending packet: from 192.168.1.38[4500] to 77.234.209.75[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 14[NET] received packet: from 77.234.209.75[4500] to 192.168.1.38[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 14[ENC] parsed ID_PROT response 0 [ ID HASH ]  Aug  3 15:22:38 ComputerOfLiza charon: 14[IKE] IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1] established between 192.168.1.38[192.168.1.38]...77.234.209.75[77.234.209.75]  Aug  3 15:22:38 ComputerOfLiza charon: 14[IKE] scheduling reauthentication in 9724s  Aug  3 15:22:38 ComputerOfLiza charon: 14[IKE] maximum IKE_SA lifetime 10264s  Aug  3 15:22:38 ComputerOfLiza charon: 14[ENC] generating QUICK_MODE request 2184681364 [ HASH SA No ID ID NAT-OA NAT-OA ]  Aug  3 15:22:38 ComputerOfLiza charon: 14[NET] sending packet: from 192.168.1.38[4500] to 77.234.209.75[4500] (188 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 15[NET] received packet: from 77.234.209.75[4500] to 192.168.1.38[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza charon: 15[ENC] parsed INFORMATIONAL_V1 request 2541531291 [ HASH N(NO_PROP) ]  Aug  3 15:22:38 ComputerOfLiza charon: 15[IKE] received NO_PROPOSAL_CHOSEN error notify  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: initiating Main Mode IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1] to 77.234.209.75  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: generating ID_PROT request 0 [ SA V V V V V ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: sending packet: from 192.168.1.38[500] to 77.234.209.75[500] (176 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received packet: from 77.234.209.75[500] to 192.168.1.38[500] (156 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: parsed ID_PROT response 0 [ SA V V V V ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received NAT-T (RFC 3947) vendor ID  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received XAuth vendor ID  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received DPD vendor ID  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received FRAGMENTATION vendor ID  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: selected proposal: IKE:3DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: generating ID_PROT request 0 [ KE No NAT-D NAT-D ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: sending packet: from 192.168.1.38[500] to 77.234.209.75[500] (244 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received packet: from 77.234.209.75[500] to 192.168.1.38[500] (236 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: local host is behind NAT, sending keep alives  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: generating ID_PROT request 0 [ ID HASH ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: sending packet: from 192.168.1.38[4500] to 77.234.209.75[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received packet: from 77.234.209.75[4500] to 192.168.1.38[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: parsed ID_PROT response 0 [ ID HASH ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1] established between 192.168.1.38[192.168.1.38]...77.234.209.75[77.234.209.75]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: scheduling reauthentication in 9724s  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: maximum IKE_SA lifetime 10264s  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: generating QUICK_MODE request 2184681364 [ HASH SA No ID ID NAT-OA NAT-OA ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: sending packet: from 192.168.1.38[4500] to 77.234.209.75[4500] (188 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received packet: from 77.234.209.75[4500] to 192.168.1.38[4500] (68 bytes)  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: parsed INFORMATIONAL_V1 request 2541531291 [ HASH N(NO_PROP) ]  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: received NO_PROPOSAL_CHOSEN error notify  Aug  3 15:22:38 ComputerOfLiza NetworkManager[1991]: establishing connection '8313482f-d2cd-4e39-a18c-86b540d6a8e3' failed  Aug  3 15:22:39 ComputerOfLiza nm-l2tp-service[1922]: xl2tpd started with pid 1997  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Not looking for kernel SAref support.  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Using l2tp kernel support.  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: xl2tpd version xl2tpd-1.3.12 started on ComputerOfLiza PID:1997  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Forked by Scott Balmos and David Stipp, (C) 2001  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Inherited by Jeff McAdams, (C) 2002  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Listening on IP address 0.0.0.0, port 47189  Aug  3 15:22:39 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Connecting to host 77.234.209.75, port 1701  Aug  3 15:22:39 ComputerOfLiza NetworkManager[627]: <info>  [1596457359.0670] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN plugin: state changed: starting (3)  Aug  3 15:22:46 ComputerOfLiza PackageKit: get-updates transaction /205_aeabdccb from uid 1000 finished with success after 736ms  Aug  3 15:22:53 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: death_handler: Fatal signal 15 received  Aug  3 15:22:53 ComputerOfLiza NetworkManager[1997]: xl2tpd[1997]: Connection 0 closed to 77.234.209.75, port 1701 (Server closing)  Aug  3 15:22:53 ComputerOfLiza NetworkManager[627]: <warn>  [1596457373.0812] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN plugin: failed: connect-failed (1)  Aug  3 15:22:53 ComputerOfLiza NetworkManager[627]: <warn>  [1596457373.0813] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN plugin: failed: connect-failed (1)  Aug  3 15:22:53 ComputerOfLiza NetworkManager[627]: <info>  [1596457373.0813] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN plugin: state changed: stopping (5)  Aug  3 15:22:53 ComputerOfLiza NetworkManager[2003]: Stopping strongSwan IPsec...  Aug  3 15:22:53 ComputerOfLiza charon: 00[DMN] signal of type SIGINT received. Shutting down  Aug  3 15:22:53 ComputerOfLiza charon: 00[IKE] deleting IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1] between 192.168.1.38[192.168.1.38]...77.234.209.75[77.234.209.75]  Aug  3 15:22:53 ComputerOfLiza charon: 00[IKE] sending DELETE for IKE_SA 8313482f-d2cd-4e39-a18c-86b540d6a8e3[1]  Aug  3 15:22:53 ComputerOfLiza charon: 00[ENC] generating INFORMATIONAL_V1 request 2766966862 [ HASH D ]  Aug  3 15:22:53 ComputerOfLiza charon: 00[NET] sending packet: from 192.168.1.38[4500] to 77.234.209.75[4500] (84 bytes)  Aug  3 15:22:53 ComputerOfLiza nm-l2tp-service[1922]: ipsec shut down  Aug  3 15:22:53 ComputerOfLiza NetworkManager[627]: <info>  [1596457373.1879] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN plugin: state changed: stopped (6)  Aug  3 15:22:53 ComputerOfLiza NetworkManager[627]: <info>  [1596457373.1906] vpn-connection[0x55c0c1266110,8313482f-d2cd-4e39-a18c-86b540d6a8e3,"Work",0]: VPN service disappeared  Aug  3 15:23:02 ComputerOfLiza NetworkManager[627]: <info>  [1596457382.2593] audit: op="statistics" arg="refresh-rate-ms" pid=990 uid=1000 result="success"  

How to boot FreeBSD from GNU GRUB 2 bootloader command mode

Posted: 14 Nov 2021 11:48 AM PST

I've been following an installation guide for FreeBSD and this part seems to be skipped. When I reboot my system after the initial installation it loads to grub boot loader, but in command mode as no options have been setup yet. I have windows10 installed on another drive.

How do I load FreeBSD from this command mode?

Is there a reason why /var/log/lastlog is a huge sparse file (1.1TB)?

Posted: 14 Nov 2021 12:01 PM PST

I have read some question, that ask advice how to rsync sparse files efficiently mentioning the files /var/log/lastlog and /var/log/faillog. Indeed I myself have stumpled over those files being an "issue" as their being backup via rsync turns them to become "unsparse".

What I hence wonder is, what is the need/backgrounding motivation to have those files as sparse, huge files (in my case it was 1.1TB)?

Also in relationship to this a follow up: Since I was assuming them to be logfiles I do not care about excesively I truncated those files, did I corrupt anything with truncating those files ?

SSH Connection on Remmina using AWS public key

Posted: 14 Nov 2021 11:06 AM PST

I am trying to login to remmina using the ssh .pub key. but when I try to connect it is asking me to ssh private key passphrase.

enter image description here

I do not know what I am doing wrong but here is a debug log.

[SSH] ssh_config_parse_line: Unsupported option: SendEnv, line: 53  [SSH] ssh_config_parse_line: Unsupported option: HashKnownHosts, line: 54  [SSH] ssh_config_parse_line: Unsupported option: GSSAPIAuthentication, line: 55  [SSH] socket_callback_connected: Socket connection callback: 1 (0)  [SSH] ssh_client_connection_callback: SSH server banner: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2  [SSH] ssh_analyze_banner: Analyzing banner: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2  [SSH] ssh_analyze_banner: We are talking to an OpenSSH client version: 7.2 (70200)  [SSH] ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey  [SSH] ssh_agent_get_ident_count: Answer type: 12, expected answer: 12  [SSH] ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey  [SSH] ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey  [SSH] ssh_pki_import_pubkey_file: Error opening /home/Workstation/.ssh/id_ed25519.pub: No such file or directory  [SSH] ssh_pki_import_privkey_file: Error opening /home/Workstation/.ssh/id_ed25519: No such file or directory  [SSH] ssh_pki_import_pubkey_file: Error opening /home/Workstation/.ssh/id_ecdsa.pub: No such file or directory  [SSH] ssh_pki_import_privkey_file: Error opening /home/Workstation/.ssh/id_ecdsa: No such file or directory  [SSH] ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey  [SSH] ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey  [SSH] ssh_pki_import_pubkey_file: Error opening /home/Workstation/.ssh/identity.pub: No such file or directory  [SSH] ssh_pki_import_privkey_file: Error opening /home/Workstation/.ssh/identity: No such file or directory  

Can anyone help me to connect to via ssh on remmina using public key?

How Do I Package a Django Website for Debian (Not a Python Package or Egg)?

Posted: 14 Nov 2021 12:03 PM PST

I have been searching for the last two weeks and chased myself into multiple dead ends trying to figure out the path that takes me where I want to go. However I finally have to admit that my answer isn't clearly posted anywhere, and here we are.

I'll start off my clarifying: I don't want to build a redistributable Django "App" which seems to mean "plugin" - This isn't a python plugin, it's a full fledged website with an FCGI server, /etc/init.d script, config file in /etc/djangoapps and a requirements.txt for the plugins my site uses.

I want to build a deb package to allow me to deploy to a Dev and Prod server from a build server (I'm using Bamboo, but Jenkins should be the same principle.)

I also want to do this on Debian 7 Wheezy, not Ubuntu. PKGME Seems to do the job on Ubuntu and Debian 8, however it fails to install in a functional state in Wheezy, and I was unable to find a way to fix it.

So I went with trying setuptools, stdeb, and debuild to create my package, which causes me to wind up with an egg, inside a deb, that does not contain any of my /etc or /usr files.

So what is the proper method here?

Tell SSH to use a graphical prompt for key passphrase

Posted: 14 Nov 2021 11:05 AM PST

How can I force SSH to request passphrases using a graphical prompt (GTK, for example) instead of the standard one that uses the terminal?

I tried setting SSH_ASKPASS=/usr/bin/ssh-askpass but it seems to have no effects.

The problem is the fact the openssh documentation says

If ssh does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set, it will execute the program specified by SSH_ASKPASS and open an X11 window to read the passphrase.

An ssh launched from the command line, in my case as the result of a git push, will have a terminal associated with it, so the SSH_ASKPASS logic seems to be ignored.

Please note that I am not referring to ssh-add, but to generic ssh invocations towards an hosts for which a key pair is present but protected by a passphrase.

No comments:

Post a Comment