#
sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # Samples # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now |
[bob@syplh bob]$ id uid=530(bob) gid=5001(bob) groups=5001(bob) [bob@syplh bob]$ ls -l /admin/bin/test -rwx------ 1 root root 15 Feb 24 19:42 /admin/bin/test [bob@syplh bob]$ /admin/bin/test -bash: /admin/bin/test: Permission denied [bob@syplh bob]$ sudo /admin/bin/test Password: test uid=0(root) gid=0(root) groups=0(root) [bob@syplh bob]$ id uid=530(bob) gid=5001(bob) groups=5001(bob) [bob@syplh bob]$ |