You are not logged in.
There are two lines that are inverted and modify the root path
It's like this:
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH
It should be like this:
if [ `id -u`" -eq 0 ]; then
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
else
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
fi
export PATH
you can check it simply by trying a user@machine# reboot
Change order the lines and resolved
a greeting
Gora gu ta gutarrok
8=þ
Offline
It was correct the first way. If id is zero, you are root and need the sbin directories. If id is not zero, you are user and get games in your path.
If you think there's a problem with root's path in beowulf, I would say you are correct, but you mis-identified the cause of the problem.
In Beowulf:
- If you use su to become root, you keep the user's PATH, and need to use the full path to commands in *sbin, like this: /sbin/reboot
- If you use su - to become root, you get root's PATH and can run commands in *sbin directly, like this: reboot
To keep the old behavior, see https://dev1galaxy.org/viewtopic.php?pid=16456#p16456
Offline