On Sun, 13 Sep 2020 13:35:39 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 13/09/2020 13.10, Dave Howorth wrote:
On Sun, 13 Sep 2020 12:07:29 +0200 "Carlos E. R." <> wrote:
Have you actually tried adding a new user?
Ok, will do.
cer@Telcontar:~> su - new Password: new@Telcontar:~> echo $PATH /home/new/bin:/usr/local/bin:/usr/bin:/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/sbin new@Telcontar:~> new@Telcontar:~> logout cer@Telcontar:~> echo $PATH /home/cer/bin:/usr/local/bin:/usr/bin:/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/sbin:/usr/sbin cer@Telcontar:~>
The only difference is no duplicated /usr/bin.
At least it starts to establish where the problem arises. How did you add the 'new' user? YaST or command-line?
YaST, of course.
I suspect /usr/sbin/useradd.local might be a place to start looking for where the sbin is injected.
Ok, let's see
/usr/sbin/useradd.local
+++·················· #!/bin/bash # # Here you can add your own stuff, that should be done for every user who # was new created. # # When you create a user with useradd, this script will be called # with the login name as parameter. Optional, UID, GID and the HOME # directory are added. #
case "$1" in --help|--version) echo Usage: $0 username [uid gid home] exit 0 ;; esac
# Check for the required argument. if [ $# -lt 1 -o $# -gt 4 ]; then echo Usage: $0 username [uid gid home] exit 1 fi
# Update NIS database # make -C /var/yp
# If SELinux is enabled, we have to run restorecon to assign # appropriate fcontexts to the respective $HOME and files under it if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled ; then test -x /sbin/restorecon || exit 2
if [ $# -lt 4 ]; then home_dir=/home/$1 else home_dir=$4 fi
if [ -d $home_dir ]; then /sbin/restorecon -R $home_dir fi fi
# All done. exit 0 ··················++-
I did not create that file, but anyway, PATH is not there.
cer@Telcontar:~> rpm -qf /usr/sbin/useradd.local shadow-4.6-lp151.2.3.2.x86_64 cer@Telcontar:~>
Or maybe one of the files in /etc/skel/
Telcontar:/etc/skel # grep PATH * grep: bin: Is a directory Telcontar:/etc/skel # grep -i PATH * grep: bin: Is a directory Telcontar:/etc/skel #
Not there...
err, you'll need to look in the subdirectories as well, and you'll need to inspect the various dot files like .bashrc Maybe there's a clever way to do it, but my brain hurts thinking about it. I'd just ls -R and then run grep repeatedly until I'd tested every file.
The only thing I remember doing very log ago, is something in sysconfig to add /usr/local to the path. Ah, that would be "suseconfig". I see:
## Type: yesno ## Default: no # # Do you want to have "." in root path? This is not recommended, but # many people do prefer it (yes/no). The setting affects all system # users (with uid < 100) # CWD_IN_ROOT_PATH="no"
## Type: yesno ## Default: yes # # Do you want to have "." in the path for normal users? # Defaults to "yes" since this has been the case for years. # CWD_IN_USER_PATH="no"
No, it is not about /usr/local, but about the dot.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org