Friday, September 5, 2008

Sudoers Example: su - root

As root
#visudo
add below lines, where user123 is uid that need su - privillage
user123 ALL=(ALL) /usr/bin/su -
user124 ALL=(ALL) /usr/bin/su -
user125 ALL=(ALL) /usr/bin/su -
user126 ALL=(ALL) /usr/bin/su -
:wq!

as user123
user123% sudo su -
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

#1) Respect the privacy of others.
#2) Think before you type.

Password:

Authorized access only!

root#

No comments:

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...