Blame modules/pam_console/pam_console.8

Packit Service b29381
.\" Copyright 1999 Red Hat Software, Inc.
Packit Service b29381
.\" Written by Michael K. Johnson <johnsonm@redhat.com>
Packit Service b29381
.TH pam_console 8 2005/10/4 "Red Hat" "System Administrator's Manual"
Packit Service b29381
.SH NAME
Packit Service b29381
pam_console \- determine user owning the system console
Packit Service b29381
.SH SYNOPSIS
Packit Service b29381
.B session optional pam_console.so
Packit Service b29381
.br
Packit Service b29381
.B auth required pam_console.so
Packit Service b29381
.SH DESCRIPTION
Packit Service b29381
pam_console.so is designed to give users at the physical console
Packit Service b29381
(virtual terminals and local xdm-managed X sessions by default, but
Packit Service b29381
that is configurable) capabilities that they would not otherwise have,
Packit Service b29381
and to take those capabilities away when the are no longer logged in at
Packit Service b29381
the console.  It provides two main kinds of capabilities: file permissions
Packit Service b29381
and authentication.
Packit Service b29381
Packit Service b29381
When a user logs in at the console and \fBno other user is currently
Packit Service b29381
logged in at the console\fP, pam_console.so will run handler programs
Packit Service b29381
specified in the file /etc/security/console.handlers such as
Packit Service b29381
pam_console_apply which changes permissions and ownership of files as
Packit Service b29381
described in the file /etc/security/console.perms.
Packit Service b29381
That user may then log in on other terminals that are considered part
Packit Service b29381
of the console, and as long as the user is still logged in at any one
Packit Service b29381
of those terminals, that user will own those devices.  When the user
Packit Service b29381
logs out of the last terminal, the console may be taken by the next
Packit Service b29381
user to log in.  Other users who have logged in at the console during
Packit Service b29381
the time that the first user was logged in will not be given ownership
Packit Service b29381
of the devices unless they log in on one of the terminals; having done
Packit Service b29381
so on any one terminal, the next user will own those devices until
Packit Service b29381
he or she has logged out of every terminal that is part of the physical
Packit Service b29381
console.  Then the race can start for the next user.  In practice, this
Packit Service b29381
is not a problem; the physical console is not generally in use by many
Packit Service b29381
people at the same time, and pam_console.so just tries to do the right
Packit Service b29381
thing in weird cases.
Packit Service b29381
Packit Service b29381
When an application attempts to authenticate the user \fBand this user
Packit Service b29381
is already logged in at the console\fP, pam_console.so checks whether
Packit Service b29381
there is a file in /etc/security/console.apps/ directory with the same name
Packit Service b29381
as the application servicename, and if such a file exists, authentication
Packit Service b29381
succeeds. This way pam_console may be utilized to run some system
Packit Service b29381
applications (reboots, config tools) without root password,
Packit Service b29381
or to enter user password on the first system login only.
Packit Service b29381
Packit Service b29381
.SH ARGUMENTS
Packit Service b29381
.IP debug
Packit Service b29381
turns on debugging
Packit Service b29381
.IP allow_nonroot_tty
Packit Service b29381
gain console locks and change permissions even if the TTY's owner is not root.
Packit Service b29381
.IP handlersfile=\fIfilename\fP
Packit Service b29381
tells pam_console.so to get the list of the handlers from a different
Packit Service b29381
file than /etc/security/console.handlers
Packit Service b29381
.\" .IP glob
Packit Service b29381
.\" \fBnot yet implemented\fP interpret strings as globs instead of
Packit Service b29381
.\" regexp expressions.
Packit Service b29381
.SH EXAMPLE
Packit Service b29381
\fB/etc/pam.d/some-system-tool\fP:
Packit Service b29381
.br
Packit Service b29381
auth sufficient pam_rootok.so
Packit Service b29381
.br
Packit Service b29381
auth required pam_console.so
Packit Service b29381
.br
Packit Service b29381
Packit Service b29381
.br
Packit Service b29381
\fB/etc/pam.d/some-login-service\fP:
Packit Service b29381
.br
Packit Service b29381
auth sufficient pam_console.so
Packit Service b29381
.br
Packit Service b29381
auth required pam_unix.so
Packit Service b29381
.br
Packit Service b29381
session required pam_unix.so
Packit Service b29381
.br
Packit Service b29381
session optional pam_console.so
Packit Service b29381
.br
Packit Service b29381
.SH FILES
Packit Service b29381
\fI/var/run/console/\fP
Packit Service b29381
.br
Packit Service b29381
\fI/var/run/console/console.lock\fP
Packit Service b29381
.br
Packit Service b29381
\fI/etc/security/console.apps\fP
Packit Service b29381
.br
Packit Service b29381
\fI/etc/security/console.handlers\fP
Packit Service b29381
.SH SECURITY NOTES
Packit Service b29381
When pam_console "auth" is used for login services which provide
Packit Service b29381
possibility of remote login, it is necessary to make sure the application
Packit Service b29381
correctly sets PAM_RHOST variable, or to deny remote logins completely.
Packit Service b29381
Currently, /bin/login (invoked from telnetd) and gdm is OK, others may be not.
Packit Service b29381
.SH "SEE ALSO"
Packit Service b29381
.BR console.perms (5)
Packit Service b29381
.br
Packit Service b29381
.BR console.apps (5)
Packit Service b29381
.br
Packit Service b29381
.BR console.handlers (5)
Packit Service b29381
.br
Packit Service b29381
.BR pam_console_apply (8)
Packit Service b29381
.br
Packit Service b29381
\fI/usr/share/doc/pam*/html/index.html\fP
Packit Service b29381
.SH BUGS
Packit Service b29381
Let's hope not, but if you find any, please report them via the "Bug Track"
Packit Service b29381
link at http://bugzilla.redhat.com/bugzilla/
Packit Service b29381
.SH AUTHORS
Packit Service b29381
Michael K. Johnson <johnsonm@redhat.com>
Packit Service b29381
.br
Packit Service b29381
Support of console.handlers and other improvements by
Packit Service b29381
Tomas Mraz <tmraz@redhat.com>