Wednesday, January 26, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Ubuntu stalls on restart or shutdown

Posted: 26 Jan 2022 02:09 AM PST

Whenever I attempt to restart or shutdown it just permanently hangs. Pressing esc shows "waiting for process systemd-udevd"

Running systemctl status systemd-udevd shows this

enter image description here

Anyone know any solutions for this so I can go back to shutting down normally without having to force it manually

Cheers

Sync folder from depot to a client workspace i Perforce

Posted: 26 Jan 2022 01:47 AM PST

How to sync folder from Perforce's depot to a new workspace using command?

server unresponsive after configuring raid 1

Posted: 26 Jan 2022 02:27 AM PST

On a brand new server I've got 2 SSD discs that are by default configured to RAID 1 and 2 6TB discs that are not. The 6TB discs are identified as /dev/sdc and /dev/sdd

I've run these commands (taken from this answer):

 parted /dev/sdc   mklabel gpt   print free(max size iz 6001GB)   mkpart primary 1M 6001GB  

Followed by:

parted /dev/sdd  mklabel gpt  print free(max size iz 6001GB)  mkpart primary 1M 6001GB  

Followed by:

sudo mdadm --verbose --create /dev/md4 --level=raid1 --raid-devices=2 /dev/sd[cd]1  sudo mkfs.ext4 /dev/md4  sudo mkdir /mnt/md4  

I appended to /etc/fstab this line:

 /dev/md4 /mnt/md4 auto defaults 0 0  

and finished with sudo mount /mnt/md4

I've also waited for discs to finish resyncing, but I am still unable to ssh into the server using normal mode. Results of cat /proc/mdstat command:

enter image description here

That is the result of lsblk command I was able to run in rescue mode (not really sure how it differs from normal mode):

enter image description here

After reboot, server never comes up again as any ssh connection is timed out. Any idea what I am doing wrong? I am running centos 7.

UPDATE:

Output of ssh -vvv root@IP:

OpenSSH_7.9p1, LibreSSL 2.7.3  debug1: Reading configuration data /etc/ssh/ssh_config  debug1: /etc/ssh/ssh_config line 48: Applying options for *  debug2: resolve_canonicalize: hostname IP is address  debug2: ssh_connect_direct  debug1: Connecting to IP [IP] port 22.  debug1: connect to address IP port 22: Operation timed out  ssh: connect to host IP port 22: Operation timed out  

User account safety in Ubuntu

Posted: 26 Jan 2022 02:44 AM PST

I am a beginner so I do not know what to search for to find an answer to my question. I am sure somebody already answered it somewhere.

I am using a Ubuntu machine with a local account which has another account used by another person. Both accounts have access to the root account. Can that other person access files in my home folder? Can that person access passwords stored in my Chrome browser?

Thanks, Eric

How to join two files into one in multiple folders using specific columns and add file names where they originated from

Posted: 26 Jan 2022 01:41 AM PST

I would like to ask, how can I join multiple files into one using a specific column and name it by the originating folder. Let me explain: I have the following files, having multiple columns and rows:

File one in path: /Bins/Bin_1/Bin_1-gene-names.txt (some of the rows are empty in specific columns):

gene_callers_id contig  start   stop    direction   COG20_CATEGORY  COG20_CATEGORY (ACCESSION)  KOfam   KOfam (ACCESSION)   Pfam    Pfam (ACCESSION)    COG20_FUNCTION  COG20_FUNCTION (ACCESSION)  KEGG_Class  KEGG_Class (ACCESSION)  KEGG_Module KEGG_Module (ACCESSION) COG20_PATHWAY   COG20_PATHWAY (ACCESSION)   dna_sequence  348 c_000000001641  92  542 r                                                           ATGG  349 c_000000001641  722 1607    f   Coenzyme transport and metabolism!!!Defense mechanisms  H!!!V   S-adenosyl-L-methionine hydrolase (adenosine-forming) [EC:3.13.1.8] K22205  S-adenosyl-l-methionine hydroxide adenosyltransferase   PF01887 Stereoselective (R,S)-S-adenosylmethionine hydrolase (adenosine-forming) (PDB:2F4N) (PUBMED:32776704)   COG1912                         ATGA  350 c_000000001641  1634    2201    f   Coenzyme transport and metabolism   H   energy-coupling factor transport system substrate-specific component    K16924  ECF-type riboflavin transporter, S component    PF07155 ECF-type riboflavin transporter, membrane (S) component (ECF-S) (PDB:4HZU) (PUBMED:23584587)    COG4720                         ATGA  351 c_000000001641  2237    4868    f   Coenzyme transport and metabolism!!!Posttranslational modification, protein turnover, chaperones    H!!!O   energy-coupling factor transport system permease/ATP-binding protein [EC:3.6.3.-]   K24040  ABC transporter PF00005 ECF-type transporter transmembrane protein EcfT (EcfT) (PDB:4HZU)!!!ABC-type glutathione transport system ATPase component, contains duplicated ATPase domain (GsiA)    COG0619!!!COG1123                           ATGG  

File two in path: /Bins/Bin_1/Bin_1-coverages.txt (all colums and rows are filled):

gene_callers_id G_C_D   G_C_R   G_N_D   G_N_R   KMET_A_D    KMET_A_R    KMET_JA_D   KMET_JA_R   KMET_JU_D   KMET_JU_R   KMET_O_D    KMET_O_R    SZBU_A_D    SZBU_A_R    SZBU_JA_D   SZBU_JA_R   SZBU_JU_D   SZBU_JU_R   SZBU_O_D    SZBU_O_R    SZVT_A_D    SZVT_A_R    SZVT_JA_D   SZVT_JA_R   SZVT_JU_D   SZVT_JU_R   SZVT_O_D    SZVT_O_R      348 0.0 0.0 0.43333333333333335 0.0 11.533333333333333  0.0 1.8844444444444444  0.0 5.253333333333333   0.6266666666666667  02.máj  0.0 0.19333333333333333 0.0 0.0 0.0 1.808888888888889   0.0 28.márc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0      349 0.0 1.12090395480226    0.3638418079096045  0.0 15.984180790960451  0.0 5.214689265536723   0.6779661016949152  13.99322033898305   0.27231638418079096 8.910734463276835   0.6779661016949152  1.5717514124293785  0.0 0.0 0.0 1.3740112994350282  0.0 0.7694915254237288  0.0 0.3389830508474576  0.0 0.33785310734463275 0.0 0.0 0.0 0.5649717514124294  0.0      350 0.0 0.63668430335097    0.3527336860670194  0.0 12.28747795414462   0.0 6.4638447971781305  0.0 10.800705467372135  1.0652557319223985  5.084656084656085   0.0 0.4567901234567901  0.0 0.0 0.0 2.1164021164021163  0.0 1.7989417989417988  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0      351 0.0 0.0 0.29228430254656024 0.0 20.935005701254276  0.11402508551881414 9.034207525655644   0.0 17.795515013302925  0.0 11.406689471683771  0.0 0.28506271379703535 0.0 0.10452299505891297 0.0 1.3010262257696694  0.0 0.6233371341695173  0.0 0.11402508551881414 0.0 0.05701254275940707 0.0 0.28506271379703535 0.0 0.6605853287723299  0.0  

I have multiple of these in the following way:

/path/Bins/Bin_1/Bin_1-gene-names.txt and Bin_1-coverages.txt; /path/Bins/Bin_2/Bin_2-gene-names.txt and Bin_2-coverages.txt ...

I would like to join these files using the first gene_callers_id column. Moreover, I would like to add the originating file name where they come from in the following way:

    Bin_name        gene_callers_id contig  start   stop    direction   COG20_CATEGORY  COG20_CATEGORY (ACCESSION)  KOfam   KOfam (ACCESSION)   Pfam    Pfam (ACCESSION)    COG20_FUNCTION  COG20_FUNCTION (ACCESSION)  KEGG_Class  KEGG_Class (ACCESSION)  KEGG_Module KEGG_Module (ACCESSION) COG20_PATHWAY   COG20_PATHWAY (ACCESSION)   dna_sequence    G_C_D   G_C_R   G_N_D   G_N_R   KMET_A_D    KMET_A_R    KMET_JA_D   KMET_JA_R   KMET_JU_D   KMET_JU_R   KMET_O_D    KMET_O_R    SZBU_A_D    SZBU_A_R    SZBU_JA_D   SZBU_JA_R   SZBU_JU_D   SZBU_JU_R   SZBU_O_D    SZBU_O_R    SZVT_A_D    SZVT_A_R    SZVT_JA_D   SZVT_JA_R   SZVT_JU_D   SZVT_JU_R   SZVT_O_D    SZVT_O_R  Bin_1   348 c_000000001641  92  542 r                                                           ATGGTT  0.0 0.0 0.43333333333333335 0.0 11.533333333333333  0.0 1.8844444444444444  0.0 5.253333333333333   0.6266666666666667  02.máj  0.0 0.19333333333333333 0.0 0.0 0.0 1.808888888888889   0.0 28.márc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0  Bin_1   349 c_000000001641  722 1607    f   Coenzyme transport and metabolism!!!Defense mechanisms  H!!!V   S-adenosyl-L-methionine hydrolase (adenosine-forming) [EC:3.13.1.8] K22205  S-adenosyl-l-methionine hydroxide adenosyltransferase   PF01887 Stereoselective (R,S)-S-adenosylmethionine hydrolase (adenosine-forming) (PDB:2F4N) (PUBMED:32776704)   COG1912                         ATGACGAA    0.0 1.12090395480226    0.3638418079096045  0.0 15.984180790960451  0.0 5.214689265536723   0.6779661016949152  13.99322033898305   0.27231638418079096 8.910734463276835   0.6779661016949152  1.5717514124293785  0.0 0.0 0.0 1.3740112994350282  0.0 0.7694915254237288  0.0 0.3389830508474576  0.0 0.33785310734463275 0.0 0.0 0.0 0.5649717514124294  0.0  Bin_1   350 c_000000001641  1634    2201    f   Coenzyme transport and metabolism   H   energy-coupling factor transport system substrate-specific component    K16924  ECF-type riboflavin transporter, S component    PF07155 ECF-type riboflavin transporter, membrane (S) component (ECF-S) (PDB:4HZU) (PUBMED:23584587)    COG4720                         ATGATA  0.0 0.63668430335097    0.3527336860670194  0.0 12.28747795414462   0.0 6.4638447971781305  0.0 10.800705467372135  1.0652557319223985  5.084656084656085   0.0 0.4567901234567901  0.0 0.0 0.0 2.1164021164021163  0.0 1.7989417989417988  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0  Bin_1   351 c_000000001641  2237    4868    f   Coenzyme transport and metabolism!!!Posttranslational modification, protein turnover, chaperones    H!!!O   energy-coupling factor transport system permease/ATP-binding protein [EC:3.6.3.-]   K24040  ABC transporter PF00005 ECF-type transporter transmembrane protein EcfT (EcfT) (PDB:4HZU)!!!ABC-type glutathione transport system ATPase component, contains duplicated ATPase domain (GsiA)    COG0619!!!COG1123                           ATGG    0.0 0.0 0.29228430254656024 0.0 20.935005701254276  0.11402508551881414 9.034207525655644   0.0 17.795515013302925  0.0 11.406689471683771  0.0 0.28506271379703535 0.0 0.10452299505891297 0.0 1.3010262257696694  0.0 0.6233371341695173  0.0 0.11402508551881414 0.0 0.05701254275940707 0.0 0.28506271379703535 0.0 0.6605853287723299  0.0  …                                                                                                                                                                                                 Bin_2   43138   c_000000186101  380 1145    r   Translation, ribosomal structure and biogenesis J   16S rRNA (uracil1498-N3)-methyltransferase [EC:2.1.1.193]   K09761  RNA methyltransferase   PF04452 16S rRNA U1498 N3-methylase RsmE (RsmE) (PDB:1NXZ)  COG1385                 16S rRNA modification   COG1385 ATGCA   0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6784313725490196  0.0 0.0 0.0 0.0 13.032679738562091  0.0 4.043137254901961   0.0 19.190849673202614  0.0 10.05359477124183   0.0  Bin_2   43139   c_000000186101  1144    2293    r   Posttranslational modification, protein turnover, chaperones    O   molecular chaperone DnaJ    K03686  DnaJ C terminal domain  PF01556 DnaJ-class molecular chaperone with C-terminal Zn finger domain (DnaJ) (PDB:1BQ0)   COG0484                         ATGGCC  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.46736292428198434 0.0 0.0 0.8703220191470844  0.0 12.056570931244561  0.0 3.352480417754569   0.0 14.157528285465622  0.0 10.736292428198434  0.0  Bin_2   43140   c_000000186101  2315    2954    r   Posttranslational modification, protein turnover, chaperones    O   molecular chaperone GrpE    K03687  GrpE    PF01025 Molecular chaperone GrpE (heat shock protein HSP-70) (GrpE) (PDB:1DKG)  COG0576                         ATGATTGAGA  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5086071987480438  0.0 0.0 0.5195618153364632  0.0 8.449139280125195   0.9389671361502347  5.841940532081377   0.0 13.726134585289515  0.4679186228482003  9.978090766823161   0.0  Bin_2   43141   c_000000186101  3190    4063    f   Cell motility!!!Intracellular trafficking, secretion, and vesicular transport!!!Extracellular structures    N!!!U!!!W           Prokaryotic N-terminal methylation motif    PF07963 Type II secretory pathway, pseudopilin PulG (PulG) (PDB:1AY2)   COG2165                         ATG 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.995418098510882   0.0 0.33104238258877433 1.4329896907216495  0.0 9.372279495990837   0.6872852233676976  3.104238258877434   0.0 16.521191294387172  0.0 6.592210767468499   0.0  …  

The result should be in the "Bins" folder, named as "Bins_summary.txt". Is it possible to do this with a simple command or bash?

Core dump not written on segmentation fault

Posted: 26 Jan 2022 02:31 AM PST

I'm now reading The Shellcoder's Handbook: Discovering and Exploiting Security Holes, 2nd Edition.

In the second chapter considered the simple buffer overflow problem like this (C code):

int main () {      int array[5];      int i;      for (i = 0; i <= 255; i++ ) {          array[i] = 10;      }  }  

Author compiled the code with cc and execute it:

shellcoders@debian:~/chapter_2$ cc buffer2.c  shellcoders@debian:~/chapter_2$ ./a.out  Segmentation fault (core dumped)  

then had a peek at written core dump with gdb:

shellcoders@debian:~/chapter_2$ gdb -q -c core  Program terminated with signal 11, Segmentation fault.  #0 0x0000000a in ?? ()  (gdb)  

The problem is that core dump haven't been written in my case. I have only message: zsh: segmentation fault ./a.out.

I use Kali 2021.4a in VirtualBox. I have been tried to change default shell with chsh -s /bin/bash but it change nothing and terminal keep opens as zsh.

How to make core dump written on fault? Looks it's should be file written in the same directory with executable file.

rhel + kernel messages about FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK

Posted: 26 Jan 2022 01:21 AM PST

we have couple DELL physical servers with the same problem about - FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK

from dmesg we can see the following

[2982241.758445]  [<ffffffff81697709>] system_call_fastpath+0x16/0x1b  [2982252.738962] sd 0:0:2:0: [sdc] tag#14 megasas: target reset FAILED!!  [2985405.797192] sd 0:0:2:0: [sdc] tag#102 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK  [2985405.797199] sd 0:0:2:0: [sdc] tag#102 CDB: Read(10) 28 00 d7 00 2c e8 00 00 08 00  [2985405.797205] blk_update_request: I/O error, dev sdc, sector 3607112936  [2985405.797214] sd 0:0:2:0: [sdc] tag#104 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK  [2985405.797217] sd 0:0:2:0: [sdc] tag#104 CDB: Read(10) 28 00 d7 00 2c f8 00 00 08 00  [2985405.797219] blk_update_request: I/O error, dev sdc, sector 3607112952  [2985405.797477] sd 0:0:2:0: [sdc] tag#97 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK  [2985405.797480] sd 0:0:2:0: [sdc] tag#97 CDB: Read(10) 28 00 d7 00 2c b8 00 00 08 00  [2985405.797482] blk_update_request: I/O error, dev sdc, sector 3607112888  [2985405.797493] sd 0:0:2:0: [sdc] tag#103 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK  [2985405.797496] sd 0:0:2:0: [sdc] tag#103 CDB: Read(10) 28 00 d7 00 2c f0 00 00 08 00  [2985405.797498] blk_update_request: I/O error, dev sdc, sector 3607112944  [2985405.797508] sd 0:0:2:0: [sdc] tag#96 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK  [2985405.797511] sd 0:0:2:0: [sdc] tag#96 CDB: Read(10) 28 00 d7 00 2c b0 00 00 08 00  [2985405.797513] blk_update_request: I/O error, dev sdc, sector 3607112880  [3443407.164780] sd 0:0:2:0: task abort: FAILED scmd(ffff881ff7b43100)  [3443433.877426] sd 0:0:2:0: tag#49 megasas: target reset FAILED!  

according to redhat the root cause is: ( https://access.redhat.com/solutions/438403 )

• DID_ERROR host status is set for an individual io request within the driver when it detects an otherwise unreported hardware issue.

and the resolutions is:

  1. Engage the storage vendor for assistance.

  2. Please review the systems hardware, switch error counters, etc. to see if there is any indication of where the issue might lie.

  3. The driver is reporting that it is receiving odd, unexpected or invalid information back from storage.

  4. DID_ERROR host status is set for an individual io request within the driver when it detects an otherwise unreported hardware issue. This includes communication and firmware issues within the storage controller, among other hardware based problems.

  5. FC Adapters: Within the fibre channel response frame from storage, conflicting data is present. This indicates an issue within the SAN/storage rather than within RHEL or its driver.

  6. LSI Adapters: scsi io command failed to complete (hung) within the controller. This is different from a scsi failed with returned status or even a clean io timeout issue where the controller was able to abort the io. This typically leads to the loss of the device and follow-on errors of DID_BAD_TARGET which are returned when the device status returned by the HBA is either LD_OFFLINE (logical device present, but not answering commands) or DEVICE_NOT_FOUND (device no longer present within hardware).

so based on above we got lost , because we not sure if we need to replace the HW machine itself , or only the sdc disk or something else

I will; appreciate to get any advice about our case ,

Arch Linux - Screens not coming back after system turned them off

Posted: 26 Jan 2022 01:23 AM PST

I have two monitors connected to a NVIDIA GT1030 one via HDMI, the other one via HDMI to DP adapter. Both monitors work fine when the system is running. I am running Arch Linux (Garuda), but the problem was also appearing on Kubuntu. I am not sure when the problem came up the first time. But it was fine for years in Kubuntu. The system is using the NVIDIA driver 495.

But when the PC turns off the monitors (not even going into sleep or hibernation) there is no way to get the monitors to turn back on. I have to reboot using the reset button or turn off the PC by hard reset.

What I tried so far:

added nouveau.modeset=0 and persistent to /etc/default/grub -> Nothing changed

Created a new swapfile of 40 GB to be large enough for the 32 GB RAM (which shouldn't matter when the PC is not going into sleep/hibernation

Tried some of the recommended key combinations, but none of them worked.

Also tried to login without seeing anything by typing in my password and hit enter, but nothing happens. Don't think I can login.

It is really annoying as the computer has to keep running, but I would like to turn off the screens. Which is not possible at the moment.

What I haven't done is checking the BIOS and using the nouveau driver (cause this messAed up my graphics completely the last time I used it and seems to be quite buggy)

Is there a way to get rid of this error bash: /usr/bin/yum: /usr/bin/python2: bad interpreter: No such file or directory

Posted: 26 Jan 2022 01:56 AM PST

Is there some other way to sort this out without having to manually get the packages using the RPM?

Update specific top configuration automatically

Posted: 26 Jan 2022 01:25 AM PST

Every time I setup a Linux system, I will update the refresh interval of top command. I first start top command, then press s and enter 1.0 to update the config.

It seems like the configuration is stored in ~/.config/procps/toprc, but it contains many other things and may be incompatible with future versions of top command.

What is the best practice on this?

Rsync: include specific sub-directories only (using external include-file)

Posted: 26 Jan 2022 01:32 AM PST

I am using rsync with the include-from="external file" option. Apart from that my problem is almost identical to this one.

I want to backup a very specific subfolder, while generally not backup any hidden folders. The only way I managed to do this is painstakingly this way:

+ home/*/.config/libreoffice/  + home/*/.config/libreoffice/4/  + home/*/.config/libreoffice/4/user/  + home/*/.config/libreoffice/4/user/registrymodifications.xcu    # hide the rest ( .local, .wine, most of .config ...)  - home/*/.*/  

Without the 3 initial lines, registrymodifications.xcu will be excluded, because its higher-level directories are unmatched until they are "hit" by the very last line... so by my experience I must whitelist them all, piece by piece.

Is there a less painful way to do this? (I'd still want to keep all my backup rules in a single, external file...)

What is the consequence of chmod 0755 for pkexec

Posted: 26 Jan 2022 02:28 AM PST

I understand that one way to quickly mitigate CVE-2021-4034 is to chmod 0755 /usr/bin/pkexec (ie remove the SUID bit from it).

I am unclear exactly what the real world consequence of this is. (And, looking at my Ubuntu 20.04 install this appears to happen when I updated polkit to a version without the bug).

How is sudo dangerous?

Posted: 26 Jan 2022 01:48 AM PST

Debian has an entry on Docker, which warns :

Docker group membership is more dangerous than sudo

That reads to me as an insinuation that sudo is itself dangerous (albeit less than Docker (group membership)).

How is sudo dangerous (perhaps generally, and beyond misconfiguration)?
In particular though, how does Debian mean here that sudo is dangerous?

How to mount WDMyCloud to Ubuntu Server via terminal

Posted: 26 Jan 2022 02:05 AM PST

So a little context first. I'm a first time linux server user :) never tried it before but I'm slowly getting the hang of things. Still learning my way around syntax and the terminal. I'm trying to run plex off of my linux server but most of my media content is on my WDMyCloud. So I'm trying to mount my WDMyCloud public drive to a folder on my linux machine so that I can then link the plex library to that folder.

I found this tutorial : Mounting the WD MyCloud on Ubuntu 20 and I followed it. I got as far as step 4 in the public shared section. But when I tried to do the following code:

sudo mount -t cifs -o rw,vers=3.0 //<*my MyCloud IP address*>  /media/public  

It would ask for Password for @root//<*my MyCloud IP address*> (press TAB for no echo) , I turned on SSH on the MyCloud and set a password and typed in the same. But even if I had SSH off and just hit enter I get:

[518.952125] CIFS VFS: Malformed UNC in devname  mount error(22): Invalid argument UNC in devname.  Refer to the mount.cifs(8) manual page (e.g. man mount.cif) and kernal log messages (dmesg)   

What am I doing wrong? am I missing somthing?

clock_gettime error logging into VSFTP on Amazon Linux 2 from certain clients only

Posted: 26 Jan 2022 01:16 AM PST

We have an FTP server VSFTPD running on AWS Linux 2; users are chrooted. Some users can log on fine, others are getting connection failed in WinSCP and an error in Filezilla. On investigation, the error is:

Relink /lib64/libnss_myhostname.so.2' with /lib64/librt.so.1' for IFUNC symbol `clock_gettime'

Oddly, the exact same configuration which works from some clients fails on others.

This doesn't seems to be a common error and I would value ideas about how to fix either in the VSFTPD configuration or the clients.

Running script in parallel using xargs and cat

Posted: 26 Jan 2022 12:06 AM PST

I'm inserting a lot of CSV files into database. I want to do it in parallel, for example run 4 processes. Right now I do it with the script like this:

find . -name "*.csv" | xargs -n 1 -P 4 ./run.sh   

And run.sh cats the file to the db:

cat "$1" | db-client "INSERT INTO ..."  

It seems like it works, but my question is: wouldn't cat mix up the inputs from 4 processes and does it really run in parallel or it waits till another process is done with cat?

SSH connects to the wrong host (IPv6)

Posted: 26 Jan 2022 02:18 AM PST

TL;DR:

I have two hosts, opi and bpi.

When I do ssh bpi, I get connected to opi. I have traced the problem down to ssh opi connecting by IPv4, but ssh bpi using (a wrong) IPv6 address. I see my OpenWRT router thinks that is associated with bpi, but it actually shows up (ip address show eth0) instead on opi.

I can post ip address show output etc., but I'm not sure what is private and what not with IPv6. The problematic address has a scope of global mngtmpaddr noprefixroute.

I don't want to start turning off everything IPv6 I see on the router, but I also can't understand whats wrong.

Details:

I have been trying to read up on IPv6 because of this problem, but I usually stay clear of networking stuff as it is not very satisfying and has lots of difficult areas.

The behaviour triggers a SSH host-key change DNS spoofing alert, so that is good. It may have something to do with OpenWRT's IPv6, but I cannot find anyone else or open issues. Also I have not setup anything to do IPv6. This is how it came, and the router was flashed last month with OpenWrt 21.02.1.

All of the boxes are Debian-based Linux. This problem appears on all three laptops I tried. All hosts are given static DHCP leases with DNS names using OpenWRT's dnsmasq service. The /etc/hosts file on each host is stock (except for a list of *.zt aliases for adresses provided by ZeroTier).

If I connect to the IPv4 addresses directly or the ZeroTier aliases then everything works as expected.

opi does not show up as IPv6 host in OpenWRT. bpi does show, but with an address of opi. Both boxes have distinct MAC's, I put those in dnsmasq for the static DHCP assignment and also keep them around in my config files for WOL.

I can connect all of their IPv6 addresses, except one on each. This may be some special address, I know almost nothing anymore about IPv6 except that I did a he.net tutorial years ago.

What can I try besides trying to turn off IPv6 altogether?

Should I set an IPv6 suffix in OpenWRT?


/etc/nsswitch.conf as requested, is as-is shipped by Ubuntu 10/Debian 11:

passwd:         compat systemd  group:          compat systemd  shadow:         compat  gshadow:        files    hosts:          files mdns4_minimal [NOTFOUND=return] dns  networks:       files    protocols:      db files  services:       db files  ethers:         db files  rpc:            db files    netgroup:       nis  

And /etc/hosts as well:

127.0.0.1   localhost  127.0.1.1   t460s    # Some IPv4 aliases here, nothing more  # 10.147.*.*    *.zt    # The following lines are desirable for IPv6 capable hosts  ::1     ip6-localhost ip6-loopback  fe00::0 ip6-localnet  ff00::0 ip6-mcastprefix  ff02::1 ip6-allnodes  ff02::2 ip6-allrouters  

Nameservers are 127.0.0.53 in on this laptop or 192.168.3.1 on all others including opi/bpi (192.168.3.1 is the OpenWRT gateway).

$ nslookup opi.lan  Server:     127.0.0.53  Address:    127.0.0.53#53    Non-authoritative answer:  Name:   opi.lan  Address: 192.168.3.182  
$ nslookup bpi.lan  Server:     127.0.0.53  Address:    127.0.0.53#53    Non-authoritative answer:  Name:   bpi.lan  Address: 192.168.3.160  Name:   bpi.lan  Address: fd26:256d:8eef::17f  
$ ssh bpi.zt nslookup bpi  Server:     192.168.3.1  Address:    192.168.3.1#53    Name:   bpi.lan  Address: 192.168.3.160  Name:   bpi.lan  Address: fd26:256d:8eef::17f  

And on the gateway itself uci show dhcp:

dhcp.@dnsmasq[0]=dnsmasq  dhcp.@dnsmasq[0].domainneeded='1'  dhcp.@dnsmasq[0].localise_queries='1'  dhcp.@dnsmasq[0].rebind_protection='1'  dhcp.@dnsmasq[0].rebind_localhost='1'  dhcp.@dnsmasq[0].local='/lan/'  dhcp.@dnsmasq[0].domain='lan'  dhcp.@dnsmasq[0].expandhosts='1'  dhcp.@dnsmasq[0].authoritative='1'  dhcp.@dnsmasq[0].readethers='1'  dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'  dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'  dhcp.@dnsmasq[0].localservice='1'  dhcp.@dnsmasq[0].ednspacket_max='1232'  dhcp.lan=dhcp  dhcp.lan.interface='lan'  dhcp.lan.start='100'  dhcp.lan.limit='150'  dhcp.lan.leasetime='12h'  dhcp.lan.dhcpv4='server'  dhcp.lan.dhcpv6='server'  dhcp.lan.ra='server'  dhcp.lan.ra_flags='managed-config' 'other-config'  dhcp.wan=dhcp  dhcp.wan.interface='wan'  dhcp.wan.ignore='1'  dhcp.odhcpd=odhcpd  dhcp.odhcpd.maindhcp='0'  dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'  dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'  dhcp.odhcpd.loglevel='4'    dhcp.@host[0]=host  dhcp.@host[0].name='xxx'  dhcp.@host[0].dns='1'  dhcp.@host[0].mac='x:x:x:x:x:x'  dhcp.@host[0].ip='192.168.3.x'  

IPv6 routes:

::1 dev lo proto kernel metric 256 pref medium  fd26:256d:8eef::3b5 dev wlp3s0 proto kernel metric 600 pref medium  fd26:256d:8eef::d1c dev enp0s31f6 proto kernel metric 100 pref medium  fd26:256d:8eef::/64 dev enp0s31f6 proto ra metric 100 pref medium  fd26:256d:8eef::/64 dev wlp3s0 proto ra metric 600 pref medium  fd26:256d:8eef::/48 via fe80::9ade:d0ff:fe5e:534c dev enp0s31f6 proto ra metric 100 pref medium  fd26:256d:8eef::/48 via fe80::9ade:d0ff:fe5e:534c dev wlp3s0 proto ra metric 600 pref medium  fe80::/64 dev enp0s31f6 proto kernel metric 100 pref medium  fe80::/64 dev ztuku7oncs proto kernel metric 256 pref medium  fe80::/64 dev wlp3s0 proto kernel metric 600 pref medium  

$ ssh bpi  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  The ECDSA host key for bpi has changed,  and the key for the corresponding IP address fd26:256d:8eef::17f  is unchanged. This could either mean that  DNS SPOOFING is happening or the IP address for the host  and its host key have changed at the same time.  Offending key for IP in /home/hari/.ssh/known_hosts:113    remove with:    ssh-keygen -f "/home/hari/.ssh/known_hosts" -R "fd26:256d:8eef::17f"  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!  Someone could be eavesdropping on you right now (man-in-the-middle attack)!  It is also possible that a host key has just been changed.  The fingerprint for the ECDSA key sent by the remote host is  SHA256:UdjpmN7FNjdrvUWRMXPDYW6wURx0BU3N/AeuZpf0oTc.  Please contact your system administrator.  Add correct host key in /home/hari/.ssh/known_hosts to get rid of this message.  Offending ECDSA key in /home/hari/.ssh/known_hosts:149    remove with:    ssh-keygen -f "/home/hari/.ssh/known_hosts" -R "bpi"  Password authentication is disabled to avoid man-in-the-middle attacks.  Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.  Agent forwarding is disabled to avoid man-in-the-middle attacks.    ___  ____  _    ___                / _ \|  _ \(_)  / _ \ _ __   ___   | | | | |_) | | | | | | '_ \ / _ \  | |_| |  __/| | | |_| | | | |  __/   \___/|_|   |_|  \___/|_| |_|\___|                                      Welcome to Armbian 21.02.2 Focal with Linux 5.10.60-sunxi  ...  
$ ssh bpi.zt   ____  ____  _   | __ )|  _ \(_)  |  _ \| |_) | |  | |_) |  __/| |  |____/|_|   |_|                   Welcome to Armbian 21.02.3 Focal with Linux 5.10.60-sunxi  ...  

Anacron kills children of my task

Posted: 26 Jan 2022 12:40 AM PST

I wanted to set up an anacron task to run a backintime backup once a day (Ubuntu 20.04.3 LTS). If you schedule this using the backintime GUI, the normal crontab is being used, but for my use case this is not suitable: I usually have my computer on standby when I'm not using it, so the cronjob would just be discarded if I don't have the computer running at that exact scheduled time. What I did instead was create a script in the cron.daily directory, so that anacron takes care of it, which also supports delayed execution in case of standby or the computer being shut down for some time. I added the following command:

sudo -i -u samuel /usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime backup-job >/dev/null  

This is exactly what backintime adds to the crontab, so I was sure it would work just fine when using anacron. But that's not the case: The job is started just fine, but the backup never finishes. The syslog output is the following:

backintime (samuel/1): INFO: Lock  backintime (samuel/1): WARNING: Inhibit Suspend failed.  backintime (samuel/1): INFO: mount ssh: [...]  backintime (samuel/1): INFO: Take a new snapshot. Profile: 1 Main profile  backintime (samuel/1): INFO: Call rsync to take the snapshot    [... around 10 seconds later ...]    anacron[1082]: Job `cron.daily' terminated (mailing output)  anacron[1082]: anacron: Can't find sendmail at /usr/sbin/sendmail, not mailing output  anacron[1082]: Can't find sendmail at /usr/sbin/sendmail, not mailing output  systemd[1]: anacron.service: Killing process 7920 (python3) with signal SIGKILL.  anacron[1082]: Normal exit (1 job run)  systemd[1]: anacron.service: Killing process 7958 (ssh-agent) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8107 (ssh) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8109 (sshfs) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8112 (python3) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8126 (rsync) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8127 (ssh) with signal SIGKILL.  systemd[1]: anacron.service: Killing process 8123 (QXcbEventQueue) with signal SIGKILL.  systemd[1]: anacron.service: Succeeded.  

I find this situation rather weird, because why would anacron deliberately kill my processes? So what happens, as far as I interpret it, is that the command I'm executing in my backup script exits rather quickly, as its only task is to spin off some worker processes like python, ssh, rsync etc, and once they're running in the background, the launcher quits. So far so good, but anacron apparently thinks it's its duty to kill off all descendants of the original backup script once the script is done. But how can I prevent it from doing so? Do I really need to manually find out the descendant PIDs and wait for all of them to be done, before exiting the backup script?

I haven't found any info on this behavior online, so I would be glad if someone had any advice on how to proceed here.

Unable to start terminal

Posted: 26 Jan 2022 01:14 AM PST

I am unable to start the terminal in Pop_OS!. Till yesterday everything was working fine but today when I started my machine and used super + T which is a default shortcut for starting the terminal in the genome it just wouldn't start. I also tried to start the terminal from the application drawer. It just wouldn't start. Any solution would be highly appreciated.

Debian10 Touchpad in basic mode after halt

Posted: 26 Jan 2022 01:39 AM PST

I run Debian 10/Gnome on a Lenovo Y2P, so far without problem. In particular uname -a yields:

Linux deepthought 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux  

Since I once ran sudo halt on 4.19.0-11-amd64, synclient -l yields:

Couldn't find synaptics properties. No synaptics driver loaded?

I.e. the touchpad works, but less sensitive, no 2-FingerScroll, no click-drag, and the Mouse & Touchpad settings menu is reduced to a basic form. On the previous version, 4.19.0-10-amd64 the touchpad still works completely normal.

Here is, what I tried so far:

  1. I have xserver-xorg-input-libinput and xserver-xorg-input-synaptics installed (and re-installed, to no avail).

  2. As in this StackExchange answer, xinput list yields:

↳ PS/2 Synaptics TouchPad id=13 [slave pointer (2)]

but copying the synaptics config file, as suggested:

cp /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/70-synaptics.conf  

and rebooting did not solve the problem. The content of 70-synaptics.conf is:

# Example xorg.conf.d snippet that assigns the touchpad driver  # to all touchpads. See xorg.conf.d(5) for more information on  # InputClass.  # DO NOT EDIT THIS FILE, your distribution will likely overwrite  # it when updating. Copy (and rename) this file into  # /etc/X11/xorg.conf.d first.  # Additional options may be added in the form of  #   Option "OptionName" "value"  #  Section "InputClass"          Identifier "touchpad catchall"          Driver "synaptics"          MatchIsTouchpad "on"  # This option is recommend on all Linux systems using evdev, but cannot be  # enabled by default. See the following link for details:  # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html  #       MatchDevicePath "/dev/input/event*"  EndSection    Section "InputClass"          Identifier "touchpad ignore duplicates"          MatchIsTouchpad "on"          MatchOS "Linux"          MatchDevicePath "/dev/input/mouse*"          Option "Ignore" "on"  EndSection    # This option enables the bottom right corner to be a right button on clickpads  # and the right and middle top areas to be right / middle buttons on clickpads  # with a top button area.  # This option is only interpreted by clickpads.  Section "InputClass"          Identifier "Default clickpad buttons"          MatchDriver "synaptics"          Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"          Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"  EndSection    # This option disables software buttons on Apple touchpads.  # This option is only interpreted by clickpads.  Section "InputClass"          Identifier "Disable clickpad buttons on Apple touchpads"          MatchProduct "Apple|bcm5974"          MatchDriver "synaptics"          Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"  EndSection  
  1. Re-adding the module to the kernel did not help but tells me this: insmod /lib/modules/4.19.0-13-amd64/kernel/drivers/input/mouse/psmouse.ko proto=imps

  2. Following this reddit, i checked dmesg like so:

$ sudo dmesg | grep -i PS/2  [    1.799257] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12  [    1.812958] mousedev: PS/2 mouse device common for all mice  [    2.218457] input: PS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input5  [  246.027504] input: PS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input81    

However, my xorg log contains nothing about Synaptics:

[   189.259]   X.Org X Server 1.20.4  X Protocol Version 11, Revision 0  [   189.259] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian  [   189.259] Current Operating System: Linux deepthought 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64  [   189.259] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-10-amd64 root=UUID=48c75b27-4eb3-426f-9a8b-80bac1fc66d5 ro quiet  [   189.259] Build Date: 05 March 2019  08:11:12PM  [   189.259] xorg-server 2:1.20.4-1 (https://www.debian.org/support)   [   189.259] Current version of pixman: 0.36.0  [   189.259]    Before reporting problems, check http://wiki.x.org          to make sure that you have the latest version.  [   189.259] Markers: (--) probed, (**) from config file, (==) default setting,          (++) from command line, (!!) notice, (II) informational,          (WW) warning, (EE) error, (NI) not implemented, (??) unknown.  [   189.260] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug  6 14:41:07 2020  [   189.260] (==) Using config directory: "/etc/X11/xorg.conf.d"  [   189.260] (==) Using system config directory "/usr/share/X11/xorg.conf.d"  [   189.261] Parse error on line 3 of section Device in file /etc/X11/xorg.conf.d/20-displaylink.conf          "MatchDriver" is not a valid keyword in this section.  [   189.262] (EE) Problem parsing the config file  [   189.262] (EE) Error parsing the config file  [   189.262] (EE)   Fatal server error:  [   189.262] (EE) no screens found(EE)   [   189.262] (EE)   Please consult the The X.Org Foundation support            at http://wiki.x.org   for help.   [   189.262] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.  [   189.262] (EE)   [   189.262] (EE) Server terminated with error (1). Closing log file.  

The error in here stems from another halted project - it has not influenced the synaptics driver in the past. But I don't see anything about the latter.

(side question: i removed the file 20-displaylink.conf a while ago, i.e. this file doesn't exist anymore. when/how does this log get updated?)

  1. As I expected, adding the module automatically at start up, as suggested here did not change anything.

  2. This link tells me, that Gnome 3.20 no longer supports synaptic drivers, but switched to libinput. I have 3.30.2., so while the behavior would make sense, I have the same Gnome version on the Kernel version 4.19.0-10-amd64, and it works just fine. Anyhow, this wiki entry should then tell me how to switch to libinput - but i seem to be too stupehd for that, i.e. I don't get what I need to do.

Now, slowly desperation kicks in, as I am not (yet) familiar enough with Linux, to cook up my own solution. Hence, any help is greatly appreciated. Also: how could halt mess this up? Is there some danger to it, I should know about?

Thank you big time!

I want to add a namespace prefix to the tags of the default name space of an XML document from the shell

Posted: 26 Jan 2022 02:00 AM PST

I have a SVG file, which is an XML document:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>  <svg     xmlns:svg="http://www.w3.org/2000/svg"     xmlns="http://www.w3.org/2000/svg"     xmlns:xlink="http://www.w3.org/1999/xlink"     xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"     xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">    <defs       id="defs2">    <!-- a lot of stuff> </defs>    <!-- more stuff-->  </svg>  

I want to add the svg: prefix to all the tags corresponding to the default namespace in order to get next output:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>  <svg:svg     xmlns:svg="http://www.w3.org/2000/svg"     xmlns:xlink="http://www.w3.org/1999/xlink"     xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"     xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">    <svg:defs       id="defs2">    <!-- a lot of stuff> </svg:defs>    <!-- more stuff-->  </svg:svg>  

I am sure this is possible in one or few command lines from the shell using xmllint and/or xmlstarlet but I can't manage it.

establish connection between Redhat7 and MSSQL database over kerberos [jdbc driver]

Posted: 26 Jan 2022 12:55 AM PST

i'm working on very annoying issue, namely our java app on redhat 7 is created to connect to mssql, which cannot parse principal stored in keytab generated by our company automats. Principal stored in keytab: svcAccount/fqdn@RELM

For tests, i generated cCache using following command

kinit -f -c -p FILENAME svcAccount@REALM  

This kind of conncection config works fine, as principal stored in cCache has syntax understable for microsoft apps, however when i'm trying to esablish connection with keytab in use i receive following error:

**com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user   'domain\ svcAccount/fqdn '**  

I've tried add "auth_to_local" into KRB5.conf but it seems that kerberos omit this config.

Any idea how to map this principal name on windows server? do i have to modify it in my java application or it's just wrong kerberos configuration? To make it more difficult: i don't have rights to kadmin, to modify keytab :/


KERBEROS CONFIGURATION:

Klist –kte keytab.file:

KVNO Timestamp           Principal       3 12/31/1969 19:00:00 svcAccount/fqdn@RELM (encryption method)       3 12/31/1969 19:00:00 svcAccount/fqdn@RELM (encryption method)       3 12/31/1969 19:00:00 svcAccount/fqdn@RELM (encryption method)  

SQLJDBCDriver.conf

SQLJDBCDriver {    com.sun.security.auth.module.Krb5LoginModule required    useKeyTab=true    keyTab="FILE:/home/filename.keytab"    principal=" svcAccount/fqdn@RELM "    storeKye=true    debug=true    credsType=both    doNotPrompt=true;    };  

Java starts with arguments

JAVA_OPTS="-Dspring.jmx.enabled=false -Dkerberos.client.reference.name=SQLJDBCDriver -Djava.security.auth.login.config=/etc/path/SQLJDBCDriver.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Djava.security.krb5.conf=/etc/krb5.conf -Dspring.profiles.active=uat"  

Connection string:

url: jdbc:sqlserver://serverName:2431;databaseName=DB_NAME;integratedSecurity=true;authenticationScheme=JavaKerberos;serverSpn=MSSQLSvc/fqdn:2431@DOMAIN  

KRB5.CONF

[libdefaults]      default_realm = DOMAIN.COM      default_ccache_name = KEYRING:persistent:%{uid}      dns_lookup_realm = true      dns_lookup_kdc = true      noaddresses = true      kdc_timesync = 0      rdns = false      kdc_timeout = X      max_retries = X      ticket_lifetime = XX      renew_lifetime = XX        [realms]        DOMAIN.COM = {        }        [domain_realm]       domain.com = DOMAIN.COM    [appdefaults]           pam = {                   validate = true                   keytab = /etc/krb5.keytab                   banner = login                   minimum_uid = X                   addressless = X                   use_shmem = tX                   ignore_unknown_principals = X           }           kinit = {                   renewable = true                   forwardable= true           }  

Can not open tomcat default page CentOS

Posted: 26 Jan 2022 02:04 AM PST

I have downloaded tomcat on my local box and when i try to run in the is the output which i have.

Using CATALINA_BASE:   /home/user/Downloads/apache-tomcat-8.0.23  Using CATALINA_HOME:   /home/user/Downloads/apache-tomcat-8.0.23  Using CATALINA_TMPDIR: /home/user/Downloads/apache-tomcat-8.0.23/temp  Using JRE_HOME:        /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre  Using CLASSPATH:       /home/user/Downloads/apache-tomcat-8.0.23/bin/bootstrap.jar:/home/user/Downloads/apache-tomcat-8.0.23/bin/tomcat-juli.jar  Tomcat started.  

The output from netstat -plntu

Proto    Recv-Q    Send-q      LocalAddress   Foreign Address    State                                                                    tcp6        3           0      0 :::8080       :::*              LISTEN  

When i try to open ip:8080 there is no page loadeded.

How to install .diff file from arch linux wiki

Posted: 26 Jan 2022 12:28 AM PST

I downloaded Ubuntu's Linux 4.4 patchset from the arch wiki for snapd, it downloaded as a tar ball and after extracting it I go a directory name linux_4.4.0-21.37.diff with a files inside named data, debugfs-aufs, namespace.txt and sysfs-aufs, according to the arch wiki page for snapd the patch is required for the reason shown below

Warning: snap-confine is built with the --disable-apparmor option; full confinement relies on an AppArmor enabled kernel with Ubuntu's Linux 4.4 patchset applied and a related profile for the snap.

I have had problems with snaps before and I think installing this patch will fix it, so can anyone please tell how to install this patch, Thank you.

Global Environment Variables for Users & systemd

Posted: 26 Jan 2022 12:32 AM PST

I have a set of environment variables that I need to be globally set for all users and all systemd services. I don't want to have to specify them it two different locations.

I tried setting them /etc/environment and /etc/profile.d. These both worked, but only for logged in users, not systemd services.

I tried setting them /etc/default/init and that didn't work for any process.

How can I set environment variables globally for all users and all services without having to specify them redundantly in multiple locations?

Distribution: Raspbian

apt-get update ignoring some URLs

Posted: 26 Jan 2022 01:01 AM PST

Any ideas on why apt-get update may be ignoring some URLs? Specifically some translation-related ones.

Sample output:

pi@raspberrypi:~ $ sudo apt-get update  Hit http://archive.raspberrypi.org jessie InRelease  Hit http://mirrordirector.raspbian.org jessie InRelease  Hit http://mirrordirector.raspbian.org jessie/main armhf Packages                    Hit http://archive.raspberrypi.org jessie/main armhf Packages  Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages  Hit http://archive.raspberrypi.org jessie/ui armhf Packages        Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages                                Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages                                     Hit http://archive.raspberrypi.org jessie/staging armhf Packages                                     Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB                              Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en  Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB  Ign http://mirrordirector.raspbian.org jessie/main Translation-en                   Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB            Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en               Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB                 Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en                    Ign http://archive.raspberrypi.org jessie/main Translation-en_GB                    Ign http://archive.raspberrypi.org jessie/main Translation-en  Ign http://archive.raspberrypi.org jessie/staging Translation-en_GB                                                                             Ign http://archive.raspberrypi.org jessie/staging Translation-en                                                                                Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB                                                                                  Ign http://archive.raspberrypi.org jessie/ui Translation-en                                                                                     Reading package lists... Done                                                                                                                   

Extra info:

pi@raspberrypi:~ $ uname -a  Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux    pi@raspberrypi:~ $ lsb_release -a  No LSB modules are available.  Distributor ID: Raspbian  Description:    Raspbian GNU/Linux 8.0 (jessie)  Release:    8.0  Codename:   jessie    pi@raspberrypi:~ $ cat /etc/apt/sources.list  deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi  # Uncomment line below then 'apt-get update' to enable 'apt-get source'  #deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi  

Is there any way to execute commands from history?

Posted: 26 Jan 2022 01:36 AM PST

For example:

[root@ip-10-0-7-125 ~]# history | grep free    594  free -m    634  free -m | xargs | awk '{print "free/total memory" $17 " / " $ 8}'    635  free -m    636  free -m | xargs | awk '{print "free/total memory" $9 " / " $ 10}'    736  df -h | xargs |  awk '{print "free/total disk: " $11 " / " $9}'    740  df -h | xargs |  awk '{print "free/total disk: " $11 " / " $8}'    741  free -m | xargs | awk '{print "free/total memory: " $17 " / " $8 " MB"}'  

I'm just wondering if there any way to execute the 636 command without typing it again, just type something plus the number, like history 636 or something.

Linux Mint 14.1 with Cinnamon - Mouse Sensitivity not Working

Posted: 26 Jan 2022 12:04 AM PST

64-bit if that matters. My mouse sensitivity slider does nothing, but my acceleration slider works. I'd like acceleration off and sensitivity how I like it, but it refuses to work. I have tested the option on two computers, and both do not change the sensitivity. Any help?

mkdir -p for files

Posted: 26 Jan 2022 02:39 AM PST

mkdir -p will create a directory; it will also make parent directories as needed.

Does a similar command exist for files, that will create a file and parent directories as needed?

No comments:

Post a Comment