In order to minimise risk of fouling up the wife's machine, I have installed using her id, then created user userme, a guestlike user without sudoers privileges, and userME, a system user without shell, but with sudoers - I didn't want to clutter the login screen too much with my name on her machine ...
So, I am now trying to install stuff for userme which require root privileges to use.
'su thewife' results in the correct 'whoami', but 'su userME' gives 'whoami'='userme', yet without authentification failure!
'sudo su userME' from userme fails for lack of sudoers privileges and fails without authentification error again when attempted from 'su thewife'
userME can login on tty1 without problems.
Does the lack of sudoers rights cascade? I've obviously done something wrong, but what? I could add userme to sudoers group, but that defeats the object of having 2 separate logins.
userme@notebook$ su userME
userme@notebook$ whoami
userme
userme@notebook$ su thewife
Password:
thewife@notebook$ whoami
thewife
thewife@notebook$ su userME
Password:
thewife@notebook$ whoami
thewife
sudo -s
Password:
root@notebook# whoami
root
root@notebook# su userME
root@notebook# whoami
root
root@notebook# su - userME
root@notebook# whoami
root
uname -a
Linux notebook 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
/bin/false
, then what you're seeing is entirely normal. See for example What's the difference between /sbin/nologin and /bin/falsesu
is the old way, usesudo
- it's easier to controlman sudo
;man sudo_root. You'll find that the userid that you first installed is a member of the
admin` group, and CANsudo
./etc/passwd
and removed the/bin/false
leaving that column blank. The result is exactly what I wanted, namely: ...login usingsu
, login usingtty
, but no listing on logins screen (except for my impotent other login, with nosudoers
). I can now remove all of theecho
s from.bashrc
and.profile
:-)