[CentOS] strange su behavior

Tue Mar 9 14:01:28 UTC 2010
Uwe (ML) Kiewel <ml at kiewel-online.ch>

From: Uwe Kiewel <ml at kiewel-online.ch>
>> If I am root and want to change the user to a non-root user, the system
>> prompts me for a password:
>> [root at halifax ~]# useradd test00
>> [root at halifax ~]# su - test00
>> We trust you have received the usual lecture from the local System
>> Administrator. It usually boils down to these three things:
>>     #1) Respect the privacy of others.
>>     #2) Think before you type.
>>     #3) With great power comes great responsibility.
>> Password:
>> [test00 at halifax ~]$ logout
>> [root at halifax ~]# su - test00
>> [test00 at halifax ~]$ logout
>> [root at halifax ~]#
>> At this test procedure I just hit the enter key at the password promt.
>> Do you have any idea for this behavoir? I expect to do so from root to
>> any account _without_ being prompted for the password.
>
>Do you have any sudo call from your /etc or /etc/skel bashrc or profile...?

Yes, I do have in /etc/bashrc:

[...]
if [ $UID -ne 0 ]; then
 echo
 sudo -l
 echo
fi


Thanks,
Uwe