shadow/man/suauth.5

113 lines
3.1 KiB
Groff

.\" Title: suauth
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\" Date: 07/30/2006
.\" Manual: File Formats and Conversions
.\" Source: File Formats and Conversions
.\"
.TH "SUAUTH" "5" "07/30/2006" "File Formats and Conversions" "File Formats and Conversions"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
suauth \- detailed su control file
.SH "SYNOPSIS"
.HP 12
\fB/etc/suauth\fR
.SH "DESCRIPTION"
.PP
The file
\fI/etc/suauth\fR
is referenced whenever the su command is called. It can change the behaviour of the su command, based upon:
.sp
.RS 3n
.nf
1) the user su is targetting
.fi
.RE
.sp
.PP
2) the user executing the su command (or any groups he might be a member of)
.PP
The file is formatted like this, with lines starting with a # being treated as comment lines and ignored;
.sp
.RS 3n
.nf
to\-id:from\-id:ACTION
.fi
.RE
.PP
Where to\-id is either the word
\fIALL\fR, a list of usernames delimited by "," or the words
\fIALL EXCEPT\fR
followed by a list of usernames delimited by ","
.PP
from\-id is formatted the same as to\-id except the extra word
\fIGROUP\fR
is recognised.
\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 neccessary.
.PP
Action can be one only of the following currently supported options.
.TP 3n
\fIDENY\fR
The attempt to su is stopped before a password is even asked for.
.TP 3n
\fINOPASS\fR
The attempt to su is automatically successful; no password is asked for.
.TP 3n
\fIOWNPASS\fR
For the su command to be successful, the user must enter his or her own password. They are told this.
.PP
Note there are three separate fields delimited by a colon. No whitespace must surround this colon. Also note that the file is examined sequentially line by line, and the first applicable rule is used without examining the file further. This makes it possible for a system administrator to exercise as fine control as he or she wishes.
.SH "EXAMPLE"
.sp
.RS 3n
.nf
# sample /etc/suauth file
#
# A couple of privileged usernames may
# su to root with their own password.
#
root:chris,birddog:OWNPASS
#
# Anyone else may not su to root unless in
# group wheel. This is how BSD does things.
#
root:ALL EXCEPT GROUP wheel:DENY
#
# Perhaps terry and birddog are accounts
# owned by the same person.
# Access can be arranged between them
# with no password.
#
terry:birddog:NOPASS
birddog:terry:NOPASS
#
.fi
.RE
.sp
.SH "FILES"
.TP 3n
\fI/etc/suauth\fR
.SH "BUGS"
.PP
There could be plenty lurking. The file parser is particularly unforgiving about syntax errors, expecting no spurious whitespace (apart from beginning and end of lines), and a specific token delimiting different things.
.SH "DIAGNOSTICS"
.PP
An error parsing the file is reported using
\fBsyslogd\fR(8)
as level ERR on facility AUTH.
.SH "SEE ALSO"
.PP
\fBsu\fR(1).