|
|
发表于 2005-3-10 20:42:05
|
显示全部楼层
管理员见谅,不要删此贴。搜遍了没找到全面的sudo.说明。在此copy了一些,觉得挺全的。这样一个常用的命令竟没有一个全面的说明,也许是我没找到。~
详见:http://www.linuxhomenetworking.com/linux-hn/addusers.htm
下面是主要的,粘贴过来好用:
The /etc/sudoers File
The /etc/sudoers file contains all the configuration and permission parameters needed for sudo to work. There are a number of guidelines that need to be followed when editing it with visudo.
General /etc/sudoers Guidelines
The /etc/sudoers file has the general format shown in Table 9-1.
Table 9-1 Format of the /etc/sudoers File
General sudoers File Record Format
usernames/group servername = (usernames command can be run as) command
There are some general guidelines when editing this file:
> Groups are the same as user groups and are differentiated from regular users by a % at the beginning. The Linux user group "users" would be represented by %users.
> You can have multiple usernames per line separated by commas.
> Multiple commands also can be separated by commas. Spaces are considered part of the command.
> The keyword ALL can mean all usernames, groups, commands and servers.
> If you run out of space on a line, you can end it with a back slash (\) and continue on the next line.
> sudo assumes that the sudoers file will be used network wide, and therefore offers the option to specify the names of servers which will be using it in the servername position in Table 9-1. In most cases, the file is used by only one server and the keyword ALL suffices for the server name.
> The NOPASSWD keyword provides access without prompting for your password. |
|