On Wed, Oct 12, 2005 at 01:04:27PM -0400, Mathias Stearn wrote: > how about whoami? It will make it very clear what the line does. > > $ whoami > mstearn > $ sudo whoami > Password: > root
This is what Joe was getting at (which he clarified out-of-band). What you really want to be testing is is the uid==0, not is the account "root". You can have multiple uid==0 accounts (that all have root privileges), or even change the account "root" to be not uid==0. It is perfectly valid, for example, to swap the string/account "nobody" with "root" such that "nobody" maps to the uid zero, giving "nobody" all of the privileges you traditionally think of as being root, and giving "root" nothing. But it's a question of how pedantic you want to be (read: I admit the difference is probably dumb in most cases). - Rob .
