Da se drugi ne bi patili kao ja, ovde je jedan lep primer kako se podesava sudo:
http://www.gentoo.org/news/en/...30915-newsletter.xml#doc_chap9
U slucaju da se obrise izvor:
Citat:
########## Code Listing 9.2: /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.
#
# User alias specification
User_Alias HELPDESK = jfox, helpdesk
User_Alias SYSADMINS = david, jc
# Cmnd alias specification
# Create aliases for all commands used in viewing files
Cmnd_Alias VIEW = /bin/cat, /bin/grep, /bin/more, /usr/bin/head, \
/usr/bin/tail, /usr/bin/less
# commands for user administration
Cmnd_Alias USERADMIN = /usr/sbin/useradd, /usr/sbin/userdel, \
/usr/sbin/usermod
# User privilege specification
# Allow SYSADMINS to run any command as any user
SYSADMINS ALL = ALL
# Allow users in HELPDESK to use the user administration commands and
# to use the VIEW commands without a password
HELPDESK ALL = USERADMIN, NOPASSWD:VIEW
# Allow users in the %users group to use the VIEW commands
%users ALL = VIEW
Citat:
Now that your /etc/sudoers file has been created, you can issue commands using sudo command.
Code Listing 9.3: Examples
(Viewing /var/log/critical/current as the helpdesk user)
helpdesk@mybox% sudo tail /var/log/critical/current
(Adding a new user as the user jfox)
jfox@mybox% sudo useradd marcus
Password: password for jfox
Code Listing 9.3: Examples
(Viewing /var/log/critical/current as the helpdesk user)
helpdesk@mybox% sudo tail /var/log/critical/current
(Adding a new user as the user jfox)
jfox@mybox% sudo useradd marcus
Password: password for jfox
Romanes Eunt Domus