You are not logged in.

#1 2020-08-27 08:12:16

norg
Member
Registered: 2012-01-13
Posts: 24

[SOLVED] cssh command not found due to missing PATH setting

Hi,

I thought I found a bug with clusterssh (https://bugs.archlinux.org/task/67728) but it seems to be an issue on my system which I installed quite recently.

So the cssh binary is in `/usr/bin/vendor_perl/cssh` but my PATH looks like `/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin/:/usr/sbin/` so it's quite obvious why a simple `cssh` isn't working.


cssh is /usr/bin/vendor_perl/cssh. /usr/bin/vendor_perl is added to your PATH via /etc/profile.d/perlbin.sh. If that isn't happening, you likely aren't starting a login shell somewhere along the way.

I did a reboot as well, so fresh login shell is done as well.

So I'm wondering what I'm missing on my system that this addition to PATH is not happening. I can fix it manually but would rather like to know why the automated why isn't working. Any idea?

Thanks

Last edited by norg (2020-08-27 08:44:28)

Offline

#2 2020-08-27 08:27:03

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] cssh command not found due to missing PATH setting

‘pacman -Qkk |& grep warning‘ should help you find the broken installs, missing files, etc...

This sounds like /etc/profile being modified maybe...if I remember correctly.
Or that file is missing from /etc/profile.d

You haven’t provided much info so this is guessing game...

Also that PATH looks wrong, sbin is a symbolic link of bin in /usr...

uname -a btw...


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2020-08-27 08:28:50

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] cssh command not found due to missing PATH setting

From where is cssh not available? From your normal shell? What kind of shell is that? Where does it come from? From your bugreport, you say you open a new terminal. What does that mean? Does that terminal open a login shell? Try it from the tty and not from within X.

If your TTY is broken as well, try to trace the problem. Your path comes from your /etc/profile. Let's have a look:

...
appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
unset -f appendpath

export PATH

...

That seems to work for you. Your path is set.

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
        for profile in /etc/profile.d/*.sh; do
                test -r "$profile" && . "$profile"
        done
        unset profile
fi

This is what should happen but does not. Are there files in your profile.d? Is profile.d accessible? Is this block in your /etc/profile correct? Does any of those files kill your PATH variable with a stupid assignment?

...
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
   test "$PS1" &&\
   test -z "$POSIXLY_CORRECT" &&\
   test "${0#-}" != sh &&\
   test -r /etc/bash.bashrc
then
        . /etc/bash.bashrc
fi
...

If you're using bash, this should happen. Check your /etc/bash.bashrc, if it somehow overwrites your PATH with something stupid.

Then there are $HOME/.profile, $HOME/.bash_profile and $HOME/.bashrc (as sourced by .bash_profile). All of them could possibly override your PATH with something stupid.

If you're not using bash, then check your shell's config files, both in /etc and in $HOME.

But again, please clarify first, what "open a new terminal" means.

Offline

#4 2020-08-27 08:44:01

norg
Member
Registered: 2012-01-13
Posts: 24

Re: [SOLVED] cssh command not found due to missing PATH setting

First of all thanks for the quick replies and yes I should have added more details!

My terminal is urxvt, but I also tried xterm. I use zsh but I also tried bash.

So `pacman -Qkk |& grep warning` shows:

warning: brscan4: /opt/brother/scanner/brscan4/brsanenetdevice4.cfg (Modification time mismatch)
warning: brscan4: /opt/brother/scanner/brscan4/brsanenetdevice4.cfg (Size mismatch)
warning: cups: /etc/cups/classes.conf (Permissions mismatch)
warning: cups: /etc/cups/printers.conf (Permissions mismatch)
editlinwarning: filesystem: /etc/arch-release (Modification time mismatch)
warning: filesystem: /etc/arch-release (Size mismatch)
warning: filesystem: /etc/resolv.conf (File type mismatch)
warning: ghc-libs: /usr/lib/ghc-8.10.1/package.conf.d/package.cache (Modification time mismatch)
warning: ghc-libs: /usr/lib/ghc-8.10.1/package.conf.d/package.cache (Size mismatch)
gtk-update-icon-cache: 9 total files, 0 altewarning: intel-ucode: /boot/intel-ucode.img (Permissions mismatch)
warning: intel-ucode: /boot/intel-ucode.img (Modification time mismatch)
libxinerama: 23 total files, 0 altered filewarning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.alias (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.alias (Size mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.alias.bin (Size mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.builtin.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.builtin.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.dep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.dep (Size mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.dep.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.dep.bin (Size mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.devname (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.softdep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.symbols (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.symbols (Size mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.symbols.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.8.1-arch1-1/modules.symbols.bin (Size mismatch)
qtwarning: shadow: /usr/bin/newgidmap (Permissions mismatch)
warning: shadow: /usr/bin/newuidmap (Permissions mismatch)
warning: systemd: /usr/lib/systemd/system/systemd-networkd.service (Modification time mismatch)
warning: systemd: /usr/lib/systemd/system/systemd-networkd.service (Size mismatch)
warning: systemd: /var/log/journal (GID mismatch)
util-linuxwarning: vlc: /usr/lib/vlc/plugins/plugins.dat (Modification time mismatch)
warning: vlc: /usr/lib/vlc/plugins/plugins.dat (Size mismatch)

Rather strange so many warnings with a rather new install, will check those but nothing that's related to profile AFAIK.

Linux HOSTNAME 5.8.1-arch1-1 #1 SMP PREEMPT Wed, 12 Aug 2020 18:50:43 +0000 x86_64 GNU/Linux

The same issue happens within the TTY and the PATH looks the same in TTY before I even run `startx`.

My `/etc/profile` contains the sections you mentioned exactly the same.

ls /etc/profile.d 
freetype2.sh  gawk.csh  gawk.sh  gpm.sh  libreoffice-fresh.csh  libreoffice-fresh.sh  locale.sh  perlbin.csh  perlbin.sh  vte.csh  vte.sh

BUT going through your instructions I tried:

source /etc/profile

Which created the correct PATH variable. I should have tried that earlier.

Thanks a lot!

Offline

#5 2020-08-27 09:56:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] cssh command not found due to missing PATH setting

You might wanna figure out, why zsh doesn't do this.

Offline

#6 2020-08-27 10:01:59

norg
Member
Registered: 2012-01-13
Posts: 24

Re: [SOLVED] cssh command not found due to missing PATH setting

Awebb wrote:

You might wanna figure out, why zsh doesn't do this.

I didn't have the .zprofile file that should use the same as /etc/zsh/zprofile, so my fault that I didn't sync that from my dotfiles.

Offline

Board footer

Powered by FluxBB