NS8 install on Debian 11 needs PATH statement

For an install of NS8 on Debian 11, this PATH statement is needed -

PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin

Environment of test. Install on Debian 11. Hyper-V host running Windows Server 2016. (Several Linux VMs running well.) Fresh minimum install of Debian 11. Install script run as root.

Before running install script, the PATH variable needs to be expanded -

PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin

Otherwise, fails with

Grant initial permissions:
Install Traefik:
bash: line 191: add-module: command not found

Hopefully, this post will save someone some time. (I apologize if this is the improper place to post this.)

1 Like

Hi Jerry, welcome to NethServer community and to NS8 :hugs:

:thinking: this is really strange: those sbin/ subdirs should be already set in Root’s PATH.

Did you connect with SSH or from the console? Straight as root or as normal user and then did you become root with “sudo su -” or similar command?

Please check and report the value of the default PATH at every step:

echo $PATH

Debian experts: any idea?

/cc @Andy_Wismer @pike

Minimum fresh Debian 11 install.

Console, not SSH.

Sign-on with user created at install. Then su.

echo $PATH from root -

/usr/local/bin:/usr/bin:/bin:/usr/local/games

(before expanding it)

Hi @davidep

I’ll try to test this this evening on Proxmox…

My 2 cents
Andy

1 Like

Try with

su -

The “-” sign should be important to set the PATH correctly

2 Likes

On my testinstallation path is o.k.

Installed from iso debian 11 netinst and than with instructions from

on a proxmox vm.

Don’t think it’s really a bug. :thinking:

1 Like

Note: su and su - don’t do the same thing, and you’d want su -. su becomes root, but doesn’t inherit root’s login environment. su - does.

2 Likes

I agree not really a bug.

Found the following sh lines in other projects that might help others.

if [[ “$PATH” =~ “:/usr/local/sbin” ]] ; then echo “PATH includes :/usr/local/sbin”; else PATH=$PATH:/usr/local/sbin ; fi
if [[ “$PATH” =~ “:/usr/sbin” ]] ; then echo “PATH includes :/usr/sbin”; else PATH=$PATH:/usr/sbin ; fi
if [[ “$PATH” =~ “:/sbin” ]] ; then echo “PATH includes :/sbin”; else PATH=$PATH:/sbin ; fi

Thank you all! Always good to learn something!!