[CentOS] strange su behavior

Bowie Bailey Bowie_Bailey at BUC.com
Tue Mar 9 20:37:36 UTC 2010


Uwe Kiewel wrote:
> Am 09.03.2010 17:32, schrieb John Doe:
> > From: Uwe (ML) Kiewel <ml at kiewel-online.ch>
> >>> Do you have any sudo call from your /etc or /etc/skel bashrc or
> profile...?
> >> Yes, I do have in /etc/bashrc:
> >> sudo -l
> > Unless you already understood:
> >   su -  "make the shell a login shell"
> >   so sudo -l  in bashrc is executed, which asks for the user's password
>
>
> Understood, who is asking - not understood why "sudo -l" is asking for
> the password and why just hitting the enter key works

Hitting the enter key "works" as far as making the prompt go away, but
the sudo command is actually failing silently.  If you enter the correct
password, you should receive some extra output.

Just pressing enter at the prompt:
    $ sudo -l
    Password:
    $

Entering the correct password:
    $ sudo -l
    Password:
    User xxxxxx may run the following commands on this host:
        (ALL) ALL
    $

-- 
Bowie


More information about the CentOS mailing list