lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] RHEL userid puzzlement


From: Greg Chicares
Subject: [lmi] RHEL userid puzzlement
Date: Wed, 11 Sep 2019 00:05:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Vadim--Can you help us figure out what's going wrong here?
This is an actual screen capture of a session on an RHEL
server. I've change what seem to be the user and domain
names, for security.

We just want to change user YYY's shell to zsh (after
having gotten root and run 'yum install zsh'):

[XXX:YYY]/home/YYY$ sudo grep YYY /etc/passwd
[XXX:YYY]/home/YYY$
[XXX:YYY]/home/YYY$ whoami
YYY

AFAICT that boils down to
  sudo grep `whoami` /etc/passwd
which I should think would necessarily work.

[XXX:YYY]/home/YYY$ sudo su -
Last login: Tue Sep 10 13:10:55 EDT 2019 on pts/0
[root@XXX]~#
[root@XXX]~# whoami
root
[root@XXX]~#

Okay, we've become root, so we have the power to
change the shell for any user we can name...but
our name doesn't seem to be XXX:YYY or YYY either:

[XXX:YYY]/home/YYY$ sudo chsh -s /bin/zsh XXX:YYY
chsh: user "XXX:YYY" does not exist.
[XXX:YYY]/home/YYY$ sudo chsh -s /bin/zsh YYY
Changing shell for YYY.
chsh: user "YYY" does not exist.
[XXX:YYY]/home/YYY$ whoami
YYY
[XXX:YYY]/home/YYY$
[XXX:YYY]/home/YYY$ chsh -s /bin/zsh YYY
Changing shell for YYY.
Password:
chsh: user "YYY" does not exist.
[XXX:YYY]/home/YYY$

How can user `whoami` not exist? What am I missing?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]