2007-10-07 17:16:52 +05:30
. \" ** You probably do not want to edit this file directly **
2007-10-07 17:17:01 +05:30
. \" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
2007-10-07 17:16:52 +05:30
. \" Instead of manually editing it, you probably should edit the DocBook XML
. \" source for it and then use the DocBook XSL Stylesheets to regenerate it.
2007-10-07 17:17:11 +05:30
.TH "SUAUTH" "5" "11/05/2005" "File Formats and Conversions" "File Formats and Conversions"
2007-10-07 17:16:52 +05:30
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
2007-10-07 17:14:44 +05:30
suauth \- Detailed su control file
2007-10-07 17:16:52 +05:30
.SH "SYNOPSIS"
.HP 12
\fB /etc/suauth\fR
.SH "DESCRIPTION"
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:17:01 +05:30
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
2007-10-07 17:14:44 +05:30
.nf
2007-10-07 17:16:52 +05:30
1) the user su is targetting
2007-10-07 17:14:44 +05:30
.fi
2007-10-07 17:17:01 +05:30
.sp
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:16:52 +05:30
2) the user executing the su command (or any groups he might be a member of)
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:16:52 +05:30
The file is formatted like this, with lines starting with a # being treated as comment lines and ignored;
2007-10-07 17:17:01 +05:30
.sp
2007-10-07 17:16:52 +05:30
.nf
to\- id:from\- id:ACTION
.fi
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:17:01 +05:30
Where to\- id is either the word
\fI ALL\fR , a list of usernames delimited by "," or the words
\fI ALL EXCEPT\fR
2007-10-07 17:16:52 +05:30
followed by a list of usernames delimited by ","
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:17:01 +05:30
from\- id is formatted the same as to\- id except the extra word
\fI GROUP\fR
is recognised.
\fI ALL EXCEPT GROUP\fR
is perfectly valid too. Following
\fI GROUP\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)
2007-10-07 17:14:44 +05:30
is neccessary.
.PP
2007-10-07 17:16:52 +05:30
Action can be one only of the following currently supported options.
.TP
\fI DENY\fR
2007-10-07 17:14:44 +05:30
The attempt to su is stopped before a password is even asked for.
2007-10-07 17:16:52 +05:30
.TP
\fI NOPASS\fR
The attempt to su is automatically successful; no password is asked for.
.TP
\fI OWNPASS\fR
For the su command to be successful, the user must enter his or her own password. They are told this.
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:16:52 +05:30
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"
2007-10-07 17:17:01 +05:30
.sp
2007-10-07 17:14:44 +05:30
.nf
2007-10-07 17:16:52 +05:30
# sample /etc/suauth file
#
# A couple of privileged usernames may
# su to root with their own password.
#
root:chris,birddog:OWNPASS
2007-10-07 17:17:01 +05:30
#
2007-10-07 17:16:52 +05:30
# 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
#
2007-10-07 17:14:44 +05:30
.fi
2007-10-07 17:17:01 +05:30
.sp
2007-10-07 17:16:52 +05:30
.SH "FILES"
.TP
2007-10-07 17:15:23 +05:30
\fI /etc/suauth\fR
2007-10-07 17:16:52 +05:30
.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
2007-10-07 17:17:01 +05:30
An error parsing the file is reported using
\fB syslogd\fR (8)
2007-10-07 17:16:52 +05:30
as level ERR on facility AUTH.
.SH "SEE ALSO"
.PP
2007-10-07 17:17:01 +05:30
\fB su\fR (1).