Friday, April 29, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Is it possible to install Virtual Box or other free virtual machines on a cluster?

Posted: 29 Apr 2022 01:46 PM PDT

We have a CentOS HPC cluster and despite asking, the admins do not like to give us root access. I have more experience with finding the packages I need in Ubuntu's apt and conda-forge etc. I am wondering if it is possible to ask them to install a virtual machine for us and not be worried about us breaking down the OS. Does anyone know if that is possible, and if so, can multiple clusters be utilized within an Ubuntu virtual machine installed on a CentOS? I assume it is reasonable to expect loss of performance for parallel simulations, but even at a moderate loss I can live with it.

how to locate the root cause of a corrupted ext3 filesystem

Posted: 29 Apr 2022 01:45 PM PDT

I have a 4G Compact Flash card with a 2.5G ext3 partition. The file system has become corrupted. I am not necessarily interested in fixing the file system as identifying exactly what is corrupted in the filesystem.

Aside from knowing outright the filesystem is corrupted, when running GNOME's Disks utility, if I select the partition and select to 'repair the filesystem', it eventually errors with: Error repairing filesystem on /dev/sdb3: Process reported exit code 1: e2fscf 1.42.9 (28-Dec-2013) (udisks-error-quark,0) I got the idea from here to use badblocks to try to identify bad blocks, get inode numbers, and find corrupted files. however when I run this, badblocks didn't find any badblocks (ran a few times)

sudo badblocks -v /dev/sdb3 -b 4096 -s  Checking blocks 0 to 622517  Checking for bad blocks (read-only test): done  Pass completed, 0 bad blocks found. (0/0/0 errors)  

I thought this was odd, so I ran fsck, but that reported no errors either:

sudo e2fsck -vcck /dev/sdb3  e2fsck 1.42.9 (28-Dec-2013)  Checking for bad blocks (non-destructive read-write test)  Testing with random pattern: done                                                   /dev/sdb3: Updating bad block inode.  Pass 1: Checking inodes, blocks, and sizes  Pass 2: Checking directory structure  Pass 3: Checking directory connectivity  Pass 4: Checking reference counts  Pass 5: Checking group summary information    /dev/sdb3: ***** FILE SYSTEM WAS MODIFIED *****          243306 inodes used (78.16%, out of 311296)           134 non-contiguous files (0.1%)           121 non-contiguous directories (0.0%)               # of inodes with ind/dind/tind blocks: 2469/39/0        583752 blocks used (93.77%, out of 622518)             0 bad blocks             0 large files          210273 regular files         28804 directories           638 character device files            12 block device files             1 fifo          2646 links          3569 symbolic links (3480 fast symbolic links)             0 sockets  ------------        245943 files  

Now I am confused. what does it mean that I cannot repair the filesystem, yet filesystem checker and badblocks tell me nothing is wrong. Is it just a mechanically failed CF card then? Anticlimactic...It is new after all.

NordVPN on Arch Linux Limited Connectivity

Posted: 29 Apr 2022 12:14 PM PDT

I am using the NordVPN-bin package from AUR on my Arch Linux system (Manjaro KDE Plasma). Connecting etc works just fine, but after I connected to the services I always get the notification: "Limited connectivity" on my WLAN/LAN. This sometimes leads to that I have no internet access anymore. Then I have to deactivate my internet connection and reactivate it. That sometimes works, but sometimes I have to reboot.

I have deactivated all additional settings for nordvpn (Kill Switch, Cybersec, etc). Also I deactivated IPv6 for my network adapters and I have removed the preinstalled package "openvpn".

Everything does not help and NordVPN Customer Service cannot help me, since Arch Linux is not official supported.

Hope someone could help me out here!

How to install guacamole on ubuntu and access directly from web just like kasmweb

Posted: 29 Apr 2022 11:53 AM PDT

can anyone help me how to install guacamole on freshly install ubuntu and access to web

What are the commands to install?

Handle names with spaces when iterating recursively over files

Posted: 29 Apr 2022 12:59 PM PDT

I am trying to recursively convert all .mkv files in a folder structure with subfolders to .mp4.

I got a standard line that works in just the present folder

for video in *.mkv; do ffmpeg -i "$video" -acodec aac -ac 2 "${video%.*}".mp4; rm "$video"; done  

So I thought I would make something like

for video in $(find . -name *.mp4); do ffmpeg -i "$video" -acodec aac -ac 2 "${video%.*}".mkv; rm "$video"; done  

But this seems to fail on folders with spaces in them. Can anyone point out my error?

Why are .z.* files created for

Posted: 29 Apr 2022 12:00 PM PDT

In my home folder I have realized that there are plenty of .z.* files are created. They all are empty. I have no idea which process have created them. What might be the reason all those files are created, is it safe to remove them?

$ cat .z.*  $ ls .z.*  .z.28    .z.3504  .z.6019  .z.9240   .z.12471  .z.15266  .z.18282  .z.20997  .z.24111  .z.26818    .z.40    .z.3511  .z.6020  .z.9293   .z.12495  .z.15268  .z.18285  .z.21031  .z.24129  .z.26847    .z.145   .z.3533  .z.6039  .z.9305   .z.12516  .z.15303  .z.18292  .z.21051  .z.24136  .z.26874    .z.217   .z.3584  .z.6049  .z.9316   .z.12548  .z.15337  .z.18348  .z.21099  .z.24143  .z.26900    .z.284   .z.3599  .z.6107  .z.9326   .z.12570  .z.15361  .z.18360  .z.21102  .z.24208  .z.26909    .z.342   .z.3611  .z.6125  .z.9353   .z.12587  .z.15378  .z.18370  .z.21103  .z.24265  .z.26913    .z.357   .z.3658  .z.6138  .z.9370   .z.12613  .z.15438  .z.18371  .z.21120  .z.24292  .z.26932    .z.360   .z.3668  .z.6152  .z.9396   .z.12676  .z.15452  .z.18398  .z.21141  .z.24303  .z.27007    .z.397   .z.3702  .z.6159  .z.9428   .z.12682  .z.15468  .z.18399  .z.21181  .z.24316  .z.27040    .z.406   .z.3744  .z.6173  .z.9443   .z.12685  .z.15476  .z.18419  .z.21219  .z.24339  .z.27042    .z.415   .z.3784  .z.6204  .z.9452   .z.12712  .z.15491  .z.18483  .z.21278  .z.24341  .z.27062    .z.500   .z.3818  .z.6317  .z.9467   .z.12748  .z.15561  .z.18484  .z.21299  .z.24344  .z.27076    .z.551   .z.3870  .z.6329  .z.9557   .z.12763  .z.15575  .z.18490  .z.21339  .z.24363  .z.27085    .z.605   .z.3886  .z.6339  .z.9594   .z.12782  .z.15583  .z.18494  .z.21384  .z.24373  .z.27124    .z.606   .z.3887  .z.6369  .z.9605   .z.12791  .z.15587  .z.18501  .z.21399  .z.24399  .z.27127   

Overlapping desktop icons of Nemo and Nautilus in CentOS

Posted: 29 Apr 2022 11:19 AM PDT

I have installed Nemo (file manager) and run the following commands

1. xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search  2. gsettings set org.gnome.desktop.background show-desktop-icons false  3. gsettings set org.nemo.desktop show-desktop-icons true  

The 2nd command should remove all the desktop icons from Nautilus and the 3rd command should add all the desktop icons from Nemo. Yet I see all the icons both from Nautilus and Nemo simultaneously, overlapping each other like below. If I run the 2nd command and observe carefully, I see the desktop icons from Nautilus disappear for a fraction of second and reappear.

enter image description here

APT-KEY GPG --recv-key process hangs without any network traffic

Posted: 29 Apr 2022 10:52 AM PDT

On Debian 11, running as root. I am attempying to add the mysql repository public key (due to the expiry in Feb) and update to mysql 8.0, but every apt-key or gpg command I run just HANGS.

Even adding -v provides no extra output. A packet capture shows no network traffic being generated. Absolutely no logs on the system during this time.

Commands I've attempted so far:

apt-key adv --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5  apt-key adv --keyserver pgp.mit.edu --recv-keys 3A79BD29  gpg -v --keyserver pgpkeys.mit.edu --recv-key 467B942D3A79BD29  gpg -v --keyserver pgpkeys.mit.edu --recv-key 3A79BD29  

The GPG commands don't even have an output, it just immediately hangs.

The ultimate problem I am trying to solve:

Err:1 http://repo.mysql.com/apt/debian buster InRelease                                                                                       The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29  

I pulled the original apt-key command from their documentation here: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Anyone know what is happening? How can I find out why these commands are hanging?

extract information from hard .log file

Posted: 29 Apr 2022 10:19 AM PDT

I've got a big .log file containing a lot of information and I would like to extract only few of this and put all in different outputs files.

Example of part of the .log file:

.....  New Water Solv 104: solv=  1.635    Saved WATERFLAP_REFINED2_SCORED_SOLV_H2O.pdb      Water:   1 AtId: 3021 ResId: 316    OH2n: -8.922    OH2s: -6.900    CRY: -0.640 ENTR: -0.321    SOLV:  0.000    DG:  6.636  CLASS: 1  Water:   2 AtId: 3013 ResId: 308    OH2n: -8.331    OH2s: -7.364    CRY: -0.885 ENTR: -0.321    SOLV:  0.000    DG:  6.453  CLASS: 1  Water:   3 AtId: 3009 ResId: 304    OH2n: -7.424    OH2s: -7.321    CRY:  5.000 ENTR: -0.036    SOLV:  0.577    DG:  5.450  CLASS: 1  Water:   4 AtId: 3064 ResId: 359    OH2n: -9.779    OH2s: -8.778    CRY: -1.187 ENTR: -0.804    SOLV:  0.000    DG:  3.279  CLASS: 1  Water: 103 AtId: 2996 ResId: 291    OH2n: -14.725   OH2s: -10.556   CRY: -1.060 ENTR: -0.607    SOLV:  0.962    DG: -0.849  CLASS: 5  Water: 104 AtId: 3004 ResId: 299    OH2n: -14.237   OH2s: -11.215   CRY: -1.197 ENTR: -0.500    SOLV:  1.635    DG: -1.185  CLASS: 5    Water Network Score Contributions:    Total       OH2n: -731.606  OH2s: -368.197  CRY: -30.908    ENTR: -94.714   DG:  28.882  Average     OH2n: -12.835   OH2s: -6.460    CRY: -0.542 ENTR: -1.662    DG:  0.507  Summary:     28.882 ( -10.345  39.228 )      Saved WATERFLAP_REFINED2_SCORED_OH2s_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_OH2n_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_DRY_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_CRY_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_ENTROPY_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_DG_WAT_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_CLASS_H2O.pdb    Saved WATERFLAP_REFINED2_SCORED_CLASS_COMPLEX.pdb    Saved WATERFLAP_REFINED2_SCORED.PDB    Saved WATERFLAP_REFINED2_SCORED_DG_WAT_H2O_ele.pdb    Saved WATERFLAP_REFINED2_SCORED_CLASS_H2O_ele.pdb    ---------------------------  WaterFLAP summary of delta DG between apo and complex    Water: 1 AtId: 2994 ResId: 289  DG_APO: -6.921 DG_COMPLEX: -7.026 DDG: -0.105 CLASS: 3  Water: 2 AtId: 2995 ResId: 290  DG_APO: -1.789 DG_COMPLEX: -2.014 DDG: -0.225 CLASS: 3  Water: 3 AtId: 2996 ResId: 291  DG_APO: -0.841 DG_COMPLEX: -0.849 DDG: -0.008 CLASS: 3  Water: 121 AtId: 3138 ResId: 433    DG_APO:  0.000 DG_COMPLEX:  0.000 DDG:  0.000 CLASS: 3  Water: 122 AtId: 3143 ResId: 438    DG_APO:  0.000 DG_COMPLEX:  0.000 DDG:  0.000 CLASS: 3  Water_USED: 1 AtId: 2994 ResId: 289 OH2n: -15.983   OH2s: -15.953   CRY: -1.934 ENTR: -0.250    DG: -7.026  CLASS: 4  Water_USED: 2 AtId: 2995 ResId: 290 OH2n: -12.808   OH2s: -11.344   CRY: -0.291 ENTR: -0.411    DG: -2.014  CLASS: 4  Water_BOUNDARY: 3 AtId: 2996 ResId: 291 OH2n: -14.725   OH2s: -10.556   CRY: -1.060 ENTR: -0.607    DG: -0.849  CLASS: 5  Water_USED: 4 AtId: 2997 ResId: 292 OH2n: -14.971   OH2s: -14.678   CRY: -2.085 ENTR: -0.375    DG: -4.170  CLASS: 4  Water_BOUNDARY: 122 AtId: 3143 ResId: 438   OH2n:  5.000    OH2s: -0.110    CRY: -0.064 ENTR: -4.875    DG:  0.000  CLASS: 5    Saved WATERFLAP_Delta_DG_CLASS_H2O_ele.pdb    Saved WATERFLAP_Delta_DG_DG_WAT_H2O_ele.pdb    Saved WATERFLAP_Delta_DG_CLASS_H2O.pdb    Saved WATERFLAP_Delta_DG_DG_WAT_H2O.pdb      ---------------------------    Apo:        DG:  35.441 DH: -3.791  -TDS:  39.232  Complex:    DG:  28.882 DH: -10.345 -TDS:  39.228    -------------  Net:        DG: -6.559  DH: -6.555  -TDS: -0.004      ---------------------------  DG Displaced:   13.760  DDG Perturbed:  6.605  DG Disp-Pert:   7.155    ---------------------------    WARNING: Setting ATOM parms from HETATM table  Atm:   CA  Q: 0.08  WARNING: Setting ATOM parms from HETATM table  Atm:   CA  Q: 0.08  ....  

The structure of the file is always the same but the number of rows, ID and numbers could change.

From this I would like to obtained 4 different outputs (maybe using some constant "string" always present as "Saved WATERFLAP_REFINED2_SCORED_SOLV_H2O.pdb", "Water Network Score Contributions", "WaterFLAP summary of delta DG between apo and complex", "Water Network Score Contributions:"???)

output1: (between "Saved WATERFLAP_REFINED2_SCORED_SOLV_H2O.pdb" and "Water Network Score Contributions")

Water:   1 AtId: 3021 ResId: 316    OH2n: -8.922    OH2s: -6.900    CRY: -0.640 ENTR: -0.321    SOLV:  0.000    DG:  6.636  CLASS: 1  Water:   2 AtId: 3013 ResId: 308    OH2n: -8.331    OH2s: -7.364    CRY: -0.885 ENTR: -0.321    SOLV:  0.000    DG:  6.453  CLASS: 1  Water:   3 AtId: 3009 ResId: 304    OH2n: -7.424    OH2s: -7.321    CRY:  5.000 ENTR: -0.036    SOLV:  0.577    DG:  5.450  CLASS: 1  Water:   4 AtId: 3064 ResId: 359    OH2n: -9.779    OH2s: -8.778    CRY: -1.187 ENTR: -0.804    SOLV:  0.000    DG:  3.279  CLASS: 1  Water: 103 AtId: 2996 ResId: 291    OH2n: -14.725   OH2s: -10.556   CRY: -1.060 ENTR: -0.607    SOLV:  0.962    DG: -0.849  CLASS: 5  Water: 104 AtId: 3004 ResId: 299    OH2n: -14.237   OH2s: -11.215   CRY: -1.197 ENTR: -0.500    SOLV:  1.635    DG: -1.185  CLASS: 5  

Output2 (Between "WaterFLAP summary of delta DG between apo and complex" and first row starting with WATER_USED or WATER_BOUNDARY)

Water: 1 AtId: 2994 ResId: 289  DG_APO: -6.921 DG_COMPLEX: -7.026 DDG: -0.105 CLASS: 3  Water: 2 AtId: 2995 ResId: 290  DG_APO: -1.789 DG_COMPLEX: -2.014 DDG: -0.225 CLASS: 3  Water: 3 AtId: 2996 ResId: 291  DG_APO: -0.841 DG_COMPLEX: -0.849 DDG: -0.008 CLASS: 3  Water: 121 AtId: 3138 ResId: 433    DG_APO:  0.000 DG_COMPLEX:  0.000 DDG:  0.000 CLASS: 3  Water: 122 AtId: 3143 ResId: 438    DG_APO:  0.000 DG_COMPLEX:  0.000 DDG:  0.000 CLASS: 3  

Output3 (Starting with row which contains WATER_USED or WATER_BOUNDARY and finished before Saved WATERFLAP_Delta_DG_CLASS_H2O_ele.pdb)

Water_BOUNDARY: 3 AtId: 2996 ResId: 291 OH2n: -14.725   OH2s: -10.556   CRY: -1.060 ENTR: -0.607    DG: -0.849  CLASS: 5  Water_USED: 4 AtId: 2997 ResId: 292 OH2n: -14.971   OH2s: -14.678   CRY: -2.085 ENTR: -0.375    DG: -4.170  CLASS: 4  Water_BOUNDARY: 122 AtId: 3143 ResId: 438   OH2n:  5.000    OH2s: -0.110    CRY: -0.064 ENTR: -4.875    DG:  0.000  CLASS: 5       

Output4

Apo:        DG:  35.441 DH: -3.791  -TDS:  39.232  Complex:    DG:  28.882 DH: -10.345 -TDS:  39.228  Net:        DG: -6.559  DH: -6.555  -TDS: -0.004  DG Displaced:   13.760  DDG Perturbed:  6.605  DG Disp-Pert:   7.155  

All Output should be a .txt file and the delimiter between columns (defined by space in the input files) should be ",".

I have not idea how I can do that. Could someone help me with this hardest challenge please?

xhost not working in combination with aws vpn client

Posted: 29 Apr 2022 09:49 AM PDT

I have a laptop running Windows with a Cygwin X server. On this machine I have a virtual Linux box running under VMWare.

I set export DISPLAY=xserver:0 on the VM and do xhost +xclient on the cygwin shell. I can use either the hostname or the IPv4 address. I can now run my X programs (mostly emacs/xterm) by redirecting the display. So far so good.

I also need to use the AWS VPN client to connect to AWS (horrible client but it works). This runs on the Windows laptop but also gets picked up by the virtual machine. I can now talk to AWS on either machine. So far so good.

However, if I try to start any X programs on the linux machine, it refuses to authenticate it. I just get the error "Authorization required, but no authorization protocol specified". If I add the IP address or the server name, it doesn't matter - same error. Neither IP address has changed (I've verified this with Wireshark).

If I do xhost + to disable the authentication, then I can connect but this is obviously hideously insecure and I don't want to do it.

I've tried going down the xauth rabbit hole but that just replaces the above errors with Invalid MIT-MAGIC-COOKIE-1 errors.

Any idea what's going on?

Group Creation Function issue

Posted: 29 Apr 2022 09:29 AM PDT

I have Created a Linux function that will create developers, my requirement is to take the developer's first name and create a linux user and development environment. It should run something like the below commands:

adduser $1  usermod -a -G devs $1  mkdir /home/$1/.ssh  chmod 700 /home/$1/.ssh  touch /home/$1/.ssh/authorized_keys  chmod 600 /home/$1/.ssh/authorized_keys  mkdir /var/www/html/$1-dev.mysite.com/  mkdir /var/log/httpd/$1-dev.mysite.com/  chown $1.devs /var/www/html/$1-dev.mysite.com/  chown $1.devs /var/log/httpd/$1-dev.mysite.com/  

If any of the '$1' directories exist it would throw a notice to the executor, right?

We'll need to edit the file created at step 6 after the process with the developer's key.. or do one of the options below would be better:

Pass the key in as a second parameter for function call

Create the key on the fly and output private key after function runs, and delete private key file?

I have tried this :

#!bin/bash  # sudo useradd -g devs username  # sudo usermod -a -G devs exampleusername  # mkdir -m 700 ${HOME}/.ssh  # touch $HOME/.ssh/authorized_keys  # chmod 600 ~/.ssh/authorized_keys  # cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys  # sudo chown -R $USER:$USER /var/www/html/dev.mysite.com/  # sudo mkdir -p /var/log/dev.mysite.com/  # sudo chmod -R 744 /var/log/dev.mysite.com/  # sudo chown -R username /var/www/html/dev.mysite.com/  # sudo chown ${USER:=$(/usr/bin/id -run)}:$USER /var/www/$dev.mysite.com  

can anyone guide me on it! I would be very grateful for any help, as my experience in this field is somewhat limited.

diff program gives false positive for files with non-ASCII characters in filename

Posted: 29 Apr 2022 09:23 AM PDT

Example:

% diff "/Volumes/New Volume/4kyoutube/" "/Volumes/New Volume/tmpmusic"| grep Distortion  Only in /Volumes/New Volume/tmpmusic: ZAC & Bäkka - Distortion (Original Mix) [Sprout].mp3  Only in /Volumes/New Volume/4kyoutube/: ZAC & Bäkka - Distortion (Original Mix) [Sprout].mp3    % diff "/Volumes/New Volume/tmpmusic/ZAC & Bäkka - Distortion (Original Mix) [Sprout].mp3" "/Volumes/New Volume/4kyoutube/ZAC & Bäkka - Distortion (Original Mix) [Sprout].mp3"   %   

What can I do about it? The files are identical.

Script to create symbolic link

Posted: 29 Apr 2022 08:49 AM PDT

I am trying to make a script that automatically create a symbolic link of a file to my Desktop.

I have made an alias to my script and made the script executable (it works if I just "echo $path"). The expected use would be

myalias myfile/  

Creating a symbolic link through the command

ln -sf /absolute/path/to/file ~/Desktop/myfile  

Here is what I tried (among a few variation):

#!/bin/bash  path= realpath $1  link= "~/Desktop/${1::-1}"  ln -sf $path $link  

and got the following error

/usr/bin/myscript: line 3: ~/Desktop/myfile: No such file or directory  

Any ideas ?

GNU Linux "sort -g" can hang indefinitely when run on standard input (on Ubuntu)

Posted: 29 Apr 2022 08:13 AM PDT

The following command (on Ubuntu 20.04 and 22.04):

dd if=/dev/urandom count=800000 bs=1 | od -An -t f4 -w4 | sponge | sort -g  

Can hang indefinitely, with the GNU sort command taking 100% of the CPU. I cannot understand what causes this. However, it only happens when the file to sort is input from stdin

File changed whilst editing with vi

Posted: 29 Apr 2022 12:12 PM PDT

I'm using an Ubuntu 20.0.4 machine and connecting via SSH to run vi. On more than one occasion, I've had a message when saving the file telling me that the file's contents had changed since I started editing it. If I look at the file on the disk, it has zero length.

I'm the only person using this machine, and if I look at ps there's nothing suspicious. I've run the clamscan rootkit hunter, and my .vimrc file is just set to expand tabs. This is a file with a ~ suffix after the extension of the same name.

wlan0 interface disabled at startup on raspberry / debian

Posted: 29 Apr 2022 08:54 AM PDT

At boot of my Raspbian (Debian 10) I have this:

$ sudo wpa_cli  wpa_cli v2.8-devel  Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors    This software may be distributed under the terms of the BSD license.  See README for more details.      Selected interface 'p2p-dev-wlan0'    Interactive mode    > status  wpa_state=INTERFACE_DISABLED  p2p_device_address=de:a6:32:32:e9:32  address=de:a6:32:32:e9:32  uuid=622a44c0-abb5-576f-93be-bd05478ea3b2  > scan  FAIL  

I can activate the wifi only with the desktop interface / mouse. Everytime I reboot I have to activate it manually.

Any hint about how to activate it on boot?

Thx

Fusermount : Fatal error failed to mount FUSE Error 1

Posted: 29 Apr 2022 11:32 AM PDT

I wanted to mount my rcloned drive. When i try to mount that rclone using this command:

rclone mount --allow-other Webseries: /webseries    2022/04/28 21:59:46 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first  2022/04/28 21:59:46 Fatal error: failed to mount FUSE fs: fusermount: exit status 1  

I want to mount it and referred to many thread related to this. I even tried..

whereis modprobe  

Output is :-

modprobe: /usr/lib/modprobe.d  

I have tried running

modprobe fuse  

It responds with bash: modprobe: command not found.

I feel like Fuse isn't installing. I can't find any file related to fuse.

I installed fuse using

sudo apt-get install fuse  

It successfully gets installed it .

Kindly refer to the log. Click here to see logs on pastebin!

I'm running Ubuntu:20.04 on docker. And seems like docker doesn't like fuse very much.

I even tried using google-drive-ocamlfuse but The VNC rdp disconnects while opening browser for Google authentication.

Almost multiseating with Sway

Posted: 29 Apr 2022 01:35 PM PDT

With swaywm I'm almost multiseating (two people simultaneously using the same computer) with two keyboards, two mice and one GPU with two outputs.

At the start of the sway session, one nested X session is opened with Xephyr querying the localhosts XDMCP server (enabled in lightdm)

In short, these are the commands executed:

swaymsg "input abc:xyz:mouse map_to_output VGA-1"  swaymsg "seat seat1 attach abc:xyz:keyboard"  swaymsg "seat seat1 attach abc:xyz:mouse"  swaymsg "seat seat1 shortcuts_inhibitor enable"  Xephyr -query 127.0.0.1 -glamor -screen 1280x720 -noreset -no-host-grab -name Xephyr1 :1 &  sleep 3  swaymsg "[instance=Xephyr1] move window to output VGA-1"  swaymsg "[instance=Xephyr1] focus"  swaymsg "floating disable"  

Xephyr successfully opens a new session, then it's moved to the proper monitor and one of the mice moves only there, and thats it.

Now, how could I capture the keyboard and mouse keypresses from the input devices attached to "seat1" only to that window/container regardless of focus?

Xephyr -keybd/-mouse driver settings doesnt work at all, neither -seat

I know how to multiseat with multiple GPUs and loginctl defining seats, but my goal is to multiseat with one GPU in any recent Linux distribution and not in old, patched ones.

Thank you very much!

bash IPC using named pipes

Posted: 29 Apr 2022 12:58 PM PDT

Consider the below script

#!/usr/bin/bash    chan=/tmp/pipe.$$  mkfifo $chan  {      for x in a b c d e      do          echo $x > $chan      done  } &  for y in 1 2 3 4 5  do      x=$(cat $chan)      echo "var $x = $y ;"  done  rm $chan  

Does not seem to work as expected. E.g.

❯ ./testpipe.sh  var a  b  c = 1 ;  ^C  

Does the echo not supposed to wait if there are no readers for the fifo? When I do this in terminal, it hangs as expected

❯ mkfifo /tmp/pipe  ❯ echo 1 > /tmp/pipe  ^C  

Why does it behave differently in the script?


Update

I changed to use fds instead of opening every time.

#!/usr/bin/bash  chan=/tmp/pipe.$$  mkfifo $chan      {      exec 5>"$chan"      for x in a "ba ba ba baanannna" c d e      do          echo $x >&5      done  } &    exec 6<"$chan"  for y in 1 2 3 4 5  do      read -u 6 x      echo "var $x = $y ;"  done  rm $chan  

Not sure I fixed it or just made it more rare for the race to occur.

❯ ./testpipe.sh  var a = 1 ;  var ba ba ba baanannna = 2 ;  var c = 3 ;  var d = 4 ;  var e = 5 ;  

Update 2

Don't need a fifo at all. Just proc substitution is enough to run something in background and read from it when required. Tested adding sleep before and after in both producer and consumers. Seems to work fine. Likely no race.

#!/usr/bin/bash    produce()  {      for x in a "ba ba ba   baanannna" "more    space" d e      do          echo "$x"      done  }    exec {fd}< <(produce)  for y in 1 2 3 4 5  do      read -u $fd x      echo "var $x = $y ;"  done  

zsh: How to retrieve the previous command line?

Posted: 29 Apr 2022 11:22 AM PDT

I would like to create a command which fetches matching previous command, something like this:

match-latest "ssh root@150"  

but which then exits and populates the command prompt with the most recent match, e.g.:

owilliams@OWILLIAMS010451 ~/go/ % ssh root@150.2.3.4  

and leaves it for the user to edit (if desired) and press enter themself. Is this possible? How would I do it?

I am using zsh 5.8 on a MacBook Pro OSX

Understanding the gateway being 255.255.255.0

Posted: 29 Apr 2022 12:59 PM PDT

I know it looks similar to a lot of questions about OpenVPN and routing table, however, I believe it's different from the rest -- or at least I haven't found a duplicate yet.

In my case after I connect to the OpenVPN server, I notice that the default gateway is changed to 255.255.255.0 (that's right, the gateway, not the mask.) Below is my routing table.

Before connecting to the OpenVPN server:

Kernel IP routing table  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  0.0.0.0         172.16.15.254   0.0.0.0         UG    20600  0        0 wlp0s20f3  169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp0s20f3  172.16.8.0      0.0.0.0         255.255.248.0   U     600    0        0 wlp0s20f3  172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0  172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-8c249cf54f1c  

After connecting to the OpenVPN server:

Kernel IP routing table  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  0.0.0.0         255.255.255.0   128.0.0.0       UG    0      0        0 tun0  0.0.0.0         172.16.15.254   0.0.0.0         UG    600    0        0 wlp0s20f3  10.8.0.0        255.255.255.0   255.255.255.0   UG    0      0        0 tun0  128.0.0.0       255.255.255.0   128.0.0.0       UG    0      0        0 tun0  169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp0s20f3  172.16.8.0      0.0.0.0         255.255.248.0   U     600    0        0 wlp0s20f3  172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0  172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-8c249cf54f1c  192.168.100.0   255.255.255.0   255.255.255.0   UG    0      0        0 tun0  _VPN_server_IP_ 172.16.15.254   255.255.255.255 UGH   0      0        0 wlp0s20f3  255.255.255.0   0.0.0.0         255.255.255.255 UH    0      0        0 tun0  

It works as expected: OpenVPN routes all my internet traffic through the server, as well as all traffic to the remote LAN (192.168.100.0/24). It just confused the bejesus out of me when I saw the gateway to be 255.255.255.0. I would understand it if the netmask was 255.255.255.0, but it's the gateway set tp 255.255.255.0. How to understand this?

If I delete the first entry with ip route del 0.0.0.0/1 via 255.255.255.0 dev tun0, sure enough the internet stops routing through the VPN. I tried to play with it by adding back with

ip route add 0.0.0.0/1 via _VPNserver_IP_ dev tun0  

or using the server's IP in the VPN subnet (10.8.0.0/24),

ip route add 0.0.0.0/1 via 10.8.0.1 dev tun0  

neither works. So I suspect this is some kind of trick the OpenVPN uses to direct it to the server. Any input would be appreciated.

How to make yum aware a source package was installed?

Posted: 29 Apr 2022 12:07 PM PDT

I removed a yum package and installed a higher version of the same package from source. But yum doesn't see it. Whenever I try to install a yum package, it tries to install the older yum package and doesn't see the source package I installed.

Is there a way to get yum to see the source package? Bear in mind I don't know how to create rpms from source yet.

Calling Bash script from Sieve script

Posted: 29 Apr 2022 11:10 AM PDT

I'm not sure if something similar has already been asked.
I'm currently trying to push emails to our spam filter when they are moved to or out of the Junk folder so it can learn them as spam/ham. To do that I followed this guide: https://workaround.org/ispmail/stretch/filtering-out-spam-with-rspamd in the section "Learning from user actions".
The sieve scripts are created following the instructions, they have been processed by sievec and permissions have been granted following the guide. The two shell scripts have also been created accordingly. The only real difference is that we don't have the user or group "vmail". I set it to dovecot:root which should be the counterpart of our system. So the folder looks like this:

drwxr-xr-x 2 dovecot root 4,0K Mai  7 10:52 .  drwxr-xr-x 3 root    root 4,0K Jul 29  2019 ..  -rw-r--r-- 1 dovecot root   85 Mai  7 10:47 learn-ham.sieve  -rw-r--r-- 1 root    root  246 Mai  7 10:47 learn-ham.svbin  -rw-r--r-- 1 dovecot root   86 Mai  7 10:47 learn-spam.sieve  -rw-r--r-- 1 root    root  250 Mai  7 10:47 learn-spam.svbin  -rw-r--r-- 1 dovecot root  509 Mär 16 13:57 mailfilter.sieve  -rw-r--r-- 1 root    root  398 Mai  6 18:02 mailfilter.svbin  -rwx------ 1 dovecot root   41 Mai  7 10:52 rspamd-learn-ham.sh  -rwx------ 1 dovecot root   42 Dez 14 10:42 rspamd-learn-spam.sh  

When the sieve script executes and is supposed to call the shell scripts, I get the following errors:

Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: Fatal: execvp(/etc/dovecot/sieve/global/rspamd-learn-spam.sh) failed: Permission denied  Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: Error: write(program stdin) failed: Broken pipe  Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: program `/etc/dovecot/sieve/global/rspamd-learn-spam.sh' terminated with non-zero exit code 84  Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: Error: sieve: pipe action: failed to pipe message to program `rspamd-learn-spam.sh': refer to server log for more information. [2020-05-12 17:16:28]  Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: sieve: left message in mailbox 'Junk'  Mai 12 17:16:28 mail dovecot[4119]: imap(user)<8778><xIGQ8nSlFMZ/AAAB>: Error: sieve: Execution of script /etc/dovecot/sieve/global/learn-spam.sieve failed  

Besides the fact that I have no clue what the "server log" refers to, I just can't figure out what exactly the problem is. Sure it seems like a permission error, but how could it be fixed?

About our system: Debian 10.4 with dovecot 2.3.4.1 and pigeonhole 0.5.4
EDIT:
I found one mistake: I had set the sieve_pipe_bin_dir to the wrong folder. It now points to the folder containing the two .sh files, but still I get those errors:

Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: Fatal: execvp(/etc/dovecot/sieve/global/rspamd-learn-spam.sh) failed: Permission denied  Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: Error: write(program stdin) failed: Broken pipe  Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: program `/etc/dovecot/sieve/global/rspamd-learn-spam.sh' terminated with non-zero exit code 84  Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: Error: sieve: pipe action: failed to pipe message to program `rspamd-learn-spam.sh': refer to server log for more information. [2020-05-22 15:40:06]  Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: sieve: left message in mailbox 'Junk'  Mai 22 15:40:06 mail dovecot[18547]: imap(user)<18686><57dcxDymXJ5/AAAB>: Error: sieve: Execution of script /etc/dovecot/sieve/global/learn-spam.sieve failed  

No matter which owner I set (root:root or dovecot:root, the only other users that are not "human-users" would be something like _apt, bin, nslcd, daemon, dovenull or www-data) Any idea what could cause that?

EDIT2:
I now changed my approach by trying to pipe directly to rspamc. Here my learn-spam.sieve script:

require ["vnd.dovecot.pipe", "copy", "imapsieve"];  pipe :copy "rspamc" ["learn_spam"];  

Accordingly I changed the 90-plugin.conf to contain

sieve_pipe_bin_dir = /usr/bin/rspamc  

where rspamc resides. Now I'm getting the error

Jun 03 09:48:34 mail dovecot[1536]: imap(user)<10486><xVI6QSmnpLN/AAAB>: Error: sieve: pipe action: failed to pipe message to program: program `rspamc' not found  Jun 03 09:48:34 mail dovecot[1536]: imap(user)<10486><xVI6QSmnpLN/AAAB>: sieve: left message in mailbox 'Junk'  Jun 03 09:48:34 mail dovecot[1536]: imap(user)<10486><xVI6QSmnpLN/AAAB>: Error: sieve: Execution of script /etc/dovecot/sieve/global/learn-spam.sieve failed  

What went wrong? Or is the pidgeonhole pipe command only able to call shell scripts?

Gnome-tweak-tool kali linux 2019 "shell not installed or running"

Posted: 29 Apr 2022 12:08 PM PDT

So I was trying to switch up the theme for my new kali linux 2019.4 virtual machine. I installed gnome-tweak-tool package for the task. However, when I run it by typing gnome-tweaks in the command line, it gives this error:

WARNING : Shell not installed or running    WARNING : Shell not running    NoneType: None    WARNING : Error detecting shell    Traceback (most recent call last):    File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_shell_extensions.py", line 217, in __init__  raise Exception("Shell not running or DBus service not available")    Exception: Shell not running or DBus service not available  

The gnome-tweaks windows shows up, but the changes don't actually take effect when I try to change the wallpaper.

I tried to run gnome-shell just to see what it did, and it gives me this:

can't load /usr/lib/x86_64-linux-gnu/spa/support/libspa-support.so: /usr/lib/x86_64-linux-gnu/spa/support/libspa-support.so: cannot open shared object file: No such file or directory    Window manager warning: Display ":0" already has a window manager; try using the --replace option to replace the current window manager.  (gnome-shell:2831): mutter-ERROR **: 18:55:08.350: Failed to start Xwayland: Failed to acquire window manager ownership    == Stack trace for context 0x560714042340 ==    Trace/breakpoint trap  

I tried doing gnome-shell --replace but the machine just crashes. Any idea how to fix this? I really just want to change my theme. Been googling for days now. Any pointers or suggestions are appreciated.

How to negate a gitignore pattern containing spaces?

Posted: 29 Apr 2022 11:02 AM PDT

My .gitignore starts by excluding everything, and then negating everything that I want to include, to avoid lots of noise in git status:

*  !awesome/  !calibre/  […]  

However, after installing Visual Studio Code I can't seem to negate the match for the directory "Code - OSS". I've tried the following lines:

!Code - OSS/  !Code\ -\ OSS/  !'Code - OSS/'  !"Code - OSS/"  !Code*  

With all of those lines at the bottom of my .gitignore git status still doesn't list this directory as available for inclusion.


The output of git check-ignore --verbose Code\ -\ OSS with each of those lines is also strange:

.config/.gitignore:22:!Code - OSS/  Code - OSS  .config/.gitignore:22:!Code\ -\ OSS/    Code - OSS  .config/.gitignore:1:*  Code - OSS  .config/.gitignore:1:*  Code - OSS  .config/.gitignore:22:!Code*    Code - OSS  

zsh line editor: Can I navigate and edit by argument?

Posted: 29 Apr 2022 11:12 AM PDT

I have a common situation in the shell when a command is attempted

command "/some/complex/and terrible/path" -vf --various --flags --and -- things --config-file="/some other/annoyingly/large/path/to/somewhere"  

and it turns out that I'm mostly there but need to move some stuff around. Suppose I have to move the last argument all the way to the front to attempt this next.

command --config-file="/some other/annoyingly/large/path/to/somewhere" "/some/complex/and terrible/path" -vf --various --flags --and -- things  

Trying to take a keystroke golf look at this, it's a dire situation. This is actually a nightmare shell command entry scenario where you kind of have to re-type (or copy&paste) almost half the command. The best hope of sanity might be to use an external editor [like this].

Even still, Vim isn't smart enough to do arg parsing (so there is no quick way to slurp out the last arg there using e.g. daW, though it should be possible to complete the job within 8 keystrokes or so given the power of vim).

I think that this can be a decent workaround, because I do bring a lot of software to bear on editing text in vim since I use it to do all of my coding.

But what I want is if Zsh (or even Bash!) line editor could be programmed somehow to let me shove an arg around. Kind of like this: https://github.com/AndrewRadev/sideways.vim But of course, this plugin won't work on space delimited shell arguments either. And it requires vim.

I'd be happy with either a directional hop (so that I can put my cursor somewhere on the --config-file arg and then mash HopLeft to hop the arg to the left) or a yank & paste (so i can put my cursor somewhere on the --config-file arg, yank it out, hit home to go to the front and paste it after it).

This way we can rapidly recompose shell arguments by navigating the args as a unit rather than navigating individual characters as a unit. It would speed up general command editing a lot. I care about this a lot because I do an unusually large amount of coding directly in the shell.

If we are to take the idea further this would be implemented as an editor mode, let's call it Argument Edit Mode, where the cursor moves across args instead of characters and a more developed set of actions can be performed on args as a unit.

Let's come back down to earth now. The question is this: can I programmatically cause zsh to delete the shell arg that i'm currently on? And then paste it back in? Can I bind a key to let me hop based on actual args instead of just hopping words?

There doesn't seem to be ready-to-use binds for use with bindkey, but it feels like there might be a way to do it if i can programmatically control the position of the cursor. I do use a plugin that can live syntax highlight my command after all. https://github.com/zsh-users/zsh-syntax-highlighting

Open a directory in the default file manager and select a file

Posted: 29 Apr 2022 09:39 AM PDT

In a program which I am writing I want to offer the functionality to open the directory where the file which I am currently processing is located and automatically select that file (so that the user does not need to search for it).

I know that I can open a directory in the default file manager using

xdg-open /path/to/directory  

I know that I can open a directory in nautilus and select a file using

nautilus /path/to/file.txt  

I thought that I could use

xdg-mime query default inode/directory  

to get the default file manager and - if it is nautilus - call it as shown above. But, despite the fact that nautilus is the default on my system (xdg-open opens nautilus and so does the places menu in the gnome shell), xdg-mime returns Thunar.desktop. (I have tried find / -name Thunar.desktop -mount 2>/dev/null but it did not find anything.)

Also, I do not know how to open a directory and select a subdirectory in nautilus (with the above mentioned approach it would open the subdirectory).

How can I open a directory in the default filemanager and select a file in that directory (if selecting a directory, too, was possible that would be great, but for this application not needed) or at least find out the default filemanager so that I can call it directly?

Kali Dns Problems

Posted: 29 Apr 2022 09:53 AM PDT

I have a problem. So, when I connect to any wi-fi station I can't use google or yandex. I solved that. The thing was in dns. I added google dns servers to 'resolv.conf' and it worked fine. However, after reconnection it does the same thing and I have to write manually or with script to set dns. Is there any way to make this process automatically when the computer connects to the network? I tried to do it through the network/interfaces post-up and if-up.d . But it didn't help. The code is like that.

interfaces:

auto wlan0      iface wlan0 inet dhcp      post-up /etc/network/ssh_and_dns_start  

ssh_and_dns_start:

#!/bin/sh    add_dns()  {  echo "nameserver 8.8.8.8  nameserver 8.8.4.4" >> /etc/resolv.conf  }    add_dns  exit 0  

Cannot use ALFA-AWUS036NHA over my laptops wireless card

Posted: 29 Apr 2022 10:07 AM PDT

I recently bought an ALFA-AWUS03NHA Wireless Card, I am running Debian and I want to use the card with the aircrack-ng suite of tools. However, I am pretty sure it is using my laptops wireless card, for a few reasons: the light on the ALFA card never flashes, and if I'm running a command and unplug the card it makes no difference.

I've done some research into the drivers for the card, I believe it uses the AR9271 driver, which is included in some download called 'ath_9k'. But I think this is already installed, at least when I run lsmod the drivers show up:

Before plugging in the card, I run the following commands:

~$ sudo iwconfig  [sudo] password for root:   eth0      no wireless extensions.    lo        no wireless extensions.    wlan0     IEEE 802.11bgn  ESSID:"..."              Mode:Managed  Frequency:2.412 GHz  Access Point: "MA:CA:DD:RE:SS"               Bit Rate=54 Mb/s   Tx-Power=16 dBm               Retry short limit:7   RTS thr:off   Fragment thr:off            Encryption key:off            Power Management:off            Link Quality=56/70  Signal level=-54 dBm              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0            Tx excessive retries:0  Invalid misc:53   Missed beacon:0    ~$ sudo ifconfig  eth0      Link encap:Ethernet  HWaddr "mac_address"              UP BROADCAST MULTICAST  MTU:1500  Metric:1            RX packets:0 errors:0 dropped:0 overruns:0 frame:0            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)    lo        Link encap:Local Loopback              inet addr:"ip address" Mask:255.0.0.0            inet6 addr: "..." Scope:Host            UP LOOPBACK RUNNING  MTU:65536  Metric:1            RX packets:166 errors:0 dropped:0 overruns:0 frame:0            TX packets:166 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:0             RX bytes:29969 (29.2 KiB)  TX bytes:29969 (29.2 KiB)    wlan0     Link encap:Ethernet  HWaddr "..."              inet addr: "..."  Bcast: "..."  Mask:255.255.240.0            inet6 addr: "..." Scope:Link            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1            RX packets:8272 errors:0 dropped:0 overruns:0 frame:0            TX packets:5897 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000             RX bytes:10531170 (10.0 MiB)  TX bytes:766102 (748.1 KiB)        ~$ lsmod | grep ath  ath9k                  98430  0   ath9k_common           12634  1 ath9k  ath9k_hw              391009  2 ath9k_common,ath9k  ath                    26026  3 ath9k_common,ath9k,ath9k_hw  mac80211              488308  1 ath9k  cfg80211              436618  3 ath,ath9k,mac80211  

I've ommitted a few things, such as identifiable network information and addresses, and a lot of things from lsmod to save space, I just included anything which had ath9k in.

Now I plug in the card, and run the following commands:

~$ lsusb  Bus 002 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n  Bus 002 Device 003: ID 062a:4102 Creative Labs   Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  Bus 001 Device 003: ID 04f2:b1d6 Chicony Electronics Co., Ltd   Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  

Note the driver number (is this a driver or chipset number? is there a difference?): 9271.

~$ sudo iwconfig  eth0      no wireless extensions.    lo        no wireless extensions.    wlan0     IEEE 802.11bgn  ESSID:"..."              Mode:Managed  Frequency:2.412 GHz  Access Point: "..."              Bit Rate=54 Mb/s   Tx-Power=16 dBm               Retry short limit:7   RTS thr:off   Fragment thr:off            Encryption key:off            Power Management:off            Link Quality=56/70  Signal level=-54 dBm              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0            Tx excessive retries:1  Invalid misc:59   Missed beacon:0    ~$ sudo ifconfig  eth0      Link encap:Ethernet  HWaddr "..."             UP BROADCAST MULTICAST  MTU:1500  Metric:1            RX packets:0 errors:0 dropped:0 overruns:0 frame:0            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)    lo        Link encap:Local Loopback              inet addr:"..."  Mask:255.0.0.0            inet6 addr: "..." Scope:Host            UP LOOPBACK RUNNING  MTU:65536  Metric:1            RX packets:178 errors:0 dropped:0 overruns:0 frame:0            TX packets:178 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:0             RX bytes:33921 (33.1 KiB)  TX bytes:33921 (33.1 KiB)    wlan0     Link encap:Ethernet  HWaddr "..."              inet addr:"..."  Bcast:"..."  Mask:255.255.240.0            inet6 addr: "..." Scope:Link            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1            RX packets:10338 errors:0 dropped:0 overruns:0 frame:0            TX packets:7222 errors:0 dropped:0 overruns:0 carrier:0            collisions:0 txqueuelen:1000             RX bytes:13177945 (12.5 MiB)  TX bytes:1030820 (1006.6 KiB)  

Running if/iwconfig seems to return pretty much the same output, with or without the card.

~$ sudo airmon-ng start wlan0      Found 3 processes that could cause trouble.  If airodump-ng, aireplay-ng or airtun-ng stops working after  a short period of time, you may want to kill (some of) them!  -e   PID Name  2675    NetworkManager  2847    wpa_supplicant  3886    dhclient  Process with PID 3886 (dhclient) is running on interface wlan0      Interface   Chipset     Driver    wlan0       Atheros AR9285  ath9k - [phy0]                  (monitor mode enabled on mon0)  

The first thing to notice is AR9285, NOT the same chipset/driver listed for the wireless card. After plugging the card in, there still seems to be one accessible wireless interface, wlan0. What is supposed to happen, do I get a new interface, wlan1, on top of the old one, or should the wireless card overwrite the other and become the new wlan0?

If I run the same lsmod command as before now the card is plugged in, I get new drivers appearing in the 'usbcore' section:

~$ lsmod | grep ath  ath9k_htc              64602  0   ath9k                  98430  0   ath9k_common           12634  2 ath9k,ath9k_htc  ath9k_hw              391009  3 ath9k_common,ath9k,ath9k_htc  ath                    26026  4 ath9k_common,ath9k,ath9k_htc,ath9k_hw  mac80211              488308  2 ath9k,ath9k_htc  cfg80211              436618  4 ath,ath9k,mac80211,ath9k_htc  usbcore               166472  5 uvcvideo,ehci_hcd,ehci_pci,usbhid,ath9k_htc  

I'm pretty sure neither of those things are happening, instead the wireless card simply isn't being used, I'm sure of this as I can unplug it with no effect, and it never flashes at any point during set up or execution of commands.

So, the question!

Do I have the correct drivers installed for the card? If so, why is it not working? Every video or tutorial I've seen assumes the Alfa is just plug and play. Am I missing out some step here?

Why can't I access to my ftp server with my local user account?

Posted: 29 Apr 2022 09:01 AM PDT

First of all I'm using Centos 6 server, putty and wordpress.org I followed the instructions from this link to set up vsftpd and ftp in centos server.

For the vsftpd.conf file, these were the changes I made:

anonymous_enable=NO  local_enable=YES  chroot_local_user=YES  

All of them are uncommented. I then restarted the vsftpd service.

For iptables I enabled input and output for port 21.

After entering the user account name and password for ftp://domain.com, it seems like the server is not recognizing my username and password. They are the same credentials I have been using to log in to CentOS server.

Then I found something on Google about getsebool. It mentioned that ftp_home_directory is turned off and I needed to turn it on with setsebool -P

OK, now I am able to connect using ftp in putty, but not in the web browser or filezilla.

No comments:

Post a Comment