LINUX How to configure sudoers file
Just edit the file
# 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
userA ALL=(ALL) ALL
userB 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
userC ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - userC
unknown-mail ALL=NOPASSWD: /bin/chmod -R 777 /usr/local/src/deploy/blog/cache/
unknown-mail ALL=NOPASSWD: /bin/chmod -R 777 /usr/local/src/deploy/site/cache/
/etc/sudoers
# 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
userA ALL=(ALL) ALL
userB 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
userC ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - userC
unknown-mail ALL=NOPASSWD: /bin/chmod -R 777 /usr/local/src/deploy/blog/cache/
unknown-mail ALL=NOPASSWD: /bin/chmod -R 777 /usr/local/src/deploy/site/cache/
Comments
Post a Comment