0

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
3
  • How exactly did you crate "a system user without shell"? If you set the login shell to /bin/false, then what you're seeing is entirely normal. See for example What's the difference between /sbin/nologin and /bin/false Dec 13, 2016 at 13:02
  • su is the old way, use sudo - it's easier to control man sudo;man sudo_root. You'll find that the userid that you first installed is a member of the admin` group, and CAN sudo.
    – waltinator
    Dec 13, 2016 at 14:19
  • Thanks to @steeldriver I edited /etc/passwd and removed the /bin/false leaving that column blank. The result is exactly what I wanted, namely: ...login using su, login using tty, but no listing on logins screen (except for my impotent other login, with no sudoers). I can now remove all of the echos from .bashrc and .profile :-)
    – HarveyP
    Dec 14, 2016 at 21:55

0

You must log in to answer this question.

Browse other questions tagged .