lmi
[Top][All Lists]
Advanced

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

Re: [lmi] RHEL userid puzzlement


From: Greg Chicares
Subject: Re: [lmi] RHEL userid puzzlement
Date: Tue, 17 Sep 2019 23:31:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 2019-09-11 13:03, Vadim Zeitlin wrote:
> On Wed, 11 Sep 2019 00:05:55 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> [XXX:YYY]/home/YYY$ sudo grep YYY /etc/passwd
> GC> [XXX:YYY]/home/YYY$
> GC> [XXX:YYY]/home/YYY$ whoami
> GC> YYY
> GC> 
> GC> AFAICT that boils down to
> GC>   sudo grep `whoami` /etc/passwd
> GC> which I should think would necessarily work.
> 
>  This depends on the system configuration, /etc/passwd is just one of the
> possible sources of the user database and I guess this system uses
> something different, e.g. an LDAP or a NIS server.

Indeed.

>  I don't know if this is normal or if the system is misconfigured, but in
> any case I don't think you have the rights to do anything about it, as the
> actual user information is not stored on it, but somewhere else.

I suppose I could try installing specialized tools as root,
but I really have no ambition to learn how to use them.

>  A quick web search shows that there is a special "lchsh" command in RedHat
> which is supposed to work on a properly configured system, so perhaps you
> could try this one?

I tried. It failed. I can change the root user's shell,
but not a "normal" user's.

>  Otherwise, I can only recommend putting "exec zsh" (preferably after
> verifying that it's available!) in your ~/.bash_login, e.g. something like
> this:
> 
>       if hash zsh 2> /dev/null; then
>               exec zsh -l
>       fi

Yup. That's the only convenient way. Others have had this
problem, and that's the answer that works:
  
https://stackoverflow.com/questions/33292541/how-do-i-change-my-default-shell-in-ubuntu-when-not-in-etc-passwd/33292612#33292612



reply via email to

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