| '\" t |
| .\" Title: suauth |
| .\" Author: Marek Micha\(/lkiewicz |
| .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> |
| .\" Date: 2018-04-29 |
| .\" Manual: 文件格式和转化 |
| .\" Source: shadow-utils 4.6 |
| .\" Language: Chinese Simplified |
| .\" |
| .TH "SUAUTH" "5" "2018-04-29" "shadow\-utils 4\&.6" "文件格式和转化" |
| .\" ----------------------------------------------------------------- |
| .\" * Define some portability stuff |
| .\" ----------------------------------------------------------------- |
| .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| .\" http://bugs.debian.org/507673 |
| .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| .ie \n(.g .ds Aq \(aq |
| .el .ds Aq ' |
| .\" ----------------------------------------------------------------- |
| .\" * set default formatting |
| .\" ----------------------------------------------------------------- |
| .\" disable hyphenation |
| .nh |
| .\" disable justification (adjust text to left margin only) |
| .ad l |
| .\" ----------------------------------------------------------------- |
| .\" * MAIN CONTENT STARTS HERE * |
| .\" ----------------------------------------------------------------- |
| .SH "名称" |
| suauth \- 详细的 su 控制文件 |
| .SH "大纲" |
| .HP \w'\fB/etc/suauth\fR\ 'u |
| \fB/etc/suauth\fR |
| .SH "描述" |
| .PP |
| 执行 su 命令时,总是根据 |
| /etc/suauth,可以更改 su 命令的行为,规则是: |
| .sp |
| .if n \{\ |
| .RS 4 |
| .\} |
| .nf |
| 1) the user su is targeting |
| |
| .fi |
| .if n \{\ |
| .RE |
| .\} |
| .PP |
| 2) 执行 su 命令的用户 (或者他可能属于的组) |
| .PP |
| 文件格式为:以 # 开头的行视为注视,并被忽略; |
| .sp |
| .if n \{\ |
| .RS 4 |
| .\} |
| .nf |
| to\-id:from\-id:ACTION |
| |
| .fi |
| .if n \{\ |
| .RE |
| .\} |
| .PP |
| 此处的 to\-id 可以是:\fIALL\fR,逗号(,) 分隔的用户名列表或者 |
| \fIALL EXCEPT\fR |
| 后跟逗号分隔的用户名列表。 |
| .PP |
| from\-id is formatted the same as to\-id except the extra word |
| \fIGROUP\fR |
| is recognized\&. |
| \fIALL EXCEPT GROUP\fR |
| is perfectly valid too\&. Following |
| \fIGROUP\fR |
| appears one or more group names, delimited by ","\&. It is not sufficient to have primary group id of the relevant group, an entry in |
| \fB/etc/group\fR(5) |
| is necessary\&. |
| .PP |
| 动作只可以使用如下当前支持的选项。 |
| .PP |
| \fIDENY\fR |
| .RS 4 |
| su 的尝试在询问密码之前就被拒绝。 |
| .RE |
| .PP |
| \fINOPASS\fR |
| .RS 4 |
| su 尝试自动成功,而且不询问密码。 |
| .RE |
| .PP |
| \fIOWNPASS\fR |
| .RS 4 |
| 为了成功执行 su,用户必须提供自己的密码。将会提示他们这样。 |
| .RE |
| .PP |
| 注意,有三个用冒号分割的字段。冒号旁边不能有空格。也请注意,这个文件会被一行一行地依次检查,会使用第一个可用的规则,而不会继续检查文件。这可以让系统管理员使系统尽量符合其期望。 |
| .SH "示例" |
| .sp |
| .if n \{\ |
| .RS 4 |
| .\} |
| .nf |
| # 示例 /etc/suauth 文件 |
| # |
| # 有两个用户可以使用自己的密码 su 成 root |
| # |
| root:chris,birddog:OWNPASS |
| # |
| # 任何其他人都不能 su 成 root,除非在 wheel 组中。 |
| # BSD 就是这样实现这个功能的。 |
| # |
| root:ALL EXCEPT GROUP wheel:DENY |
| # |
| # 或许 terry 和 birddog 是属于同一个人的账户 |
| # 两个账户直接互相 su,不需要密码 |
| # |
| terry:birddog:NOPASS |
| birddog:terry:NOPASS |
| # |
| |
| .fi |
| .if n \{\ |
| .RE |
| .\} |
| .SH "文件" |
| .PP |
| /etc/suauth |
| .RS 4 |
| .RE |
| .SH "缺陷" |
| .PP |
| 可能会有很多潜在问题。文件解析器尤其不能容忍语法错误,不能有无意义的空白符(除了行首和行尾),并且使用特定的标记分割不同的事情。 |
| .SH "DIAGNOSTICS" |
| .PP |
| 此文件的解析错误会使用 |
| \fBsyslogd\fR(8) |
| 作为 AUTH 中的 ERR 级别报告。 |
| .SH "参见" |
| .PP |
| \fBsu\fR(1)\&. |