pam_console(8)
π NAME π
okay so welcome to the pam_console(8) page bestie β¨ β this one's all about determining the user who owns the system console. yes, that's the whole vibe. console ownership. it's giving "who's the main character of this physical machine" energy π
π¦ SYNOPSIS π¦
session optional pam_console.so
auth required pam_console.so
πΈ DESCRIPTION πΈ
okay so pam_console.so is literally designed to give users at the physical console some extra capabilities they would NOT otherwise have β and then take those capabilities away when they're no longer logged in at the console π. and when we say physical console? by default that means virtual terminals and local xdm-managed X sessions, but bestie that is configurable, so don't come for me.
it provides two main kinds of capabilities: file permissions and authentication π.
β¨ the file permissions situation β¨
so when a user logs in at the console and no other user is currently logged in at the console, pam_console.so will run handler programs specified in the file /etc/security/console.handlers β such as pam_console_apply, which changes permissions and ownership of files as described in the file /etc/security/console.perms π
that user may then log in on other terminals that are considered part of the console, and as long as the user is still logged in at any one of those terminals, that user will own those devices. when the user logs out of the last terminal, the console may be taken by the next user to log in. other users who have logged in at the console during the time that the first user was logged in will not be given ownership of the devices unless they log in on one of the terminals; having done so on any one terminal, the next user will own those devices until he or she has logged out of every terminal that is part of the physical console. then the race can start for the next user π
and like, in practice? this is not a problem. the physical console is not generally in use by many people at the same time, and pam_console.so just tries to do the right thing in weird cases π«Ά
π the authentication situation π
when an application attempts to authenticate the user and this user is already logged in at the console, pam_console.so checks whether there is a file in the /etc/security/console.apps/ directory with the same name as the application servicename β and if such a file exists, authentication succeeds β
.
this way pam_console may be utilized to run some system applications (reboots, config tools) without root password, or to enter user password on the first system login only. iconic behavior honestly ππ₯
π ARGUMENTS π
debugβ turns on debugging πallow_nonroot_ttyβ gain console locks and change permissions even if the TTY's owner is notroot. yes, even then πhandlersfile=filename β tellspam_console.soto get the list of the handlers from a different file than/etc/security/console.handlersπ
π EXAMPLE π
/etc/pam.d/some-system-tool:
auth sufficient pam_rootok.so
auth required pam_console.so
/etc/pam.d/some-login-service:
auth sufficient pam_console.so
auth required pam_unix.so
session required pam_unix.so
session optional pam_console.so
slay, copy-paste responsibly π
π FILES π
/var/run/console//var/run/console/console.lock/etc/security/console.apps/etc/security/console.handlers
these are the paths, bestie, don't lose them π
π¨ SECURITY NOTES π¨
whenpam_console"auth" is used for login services which provide possibility of remote login, it is necessary to make sure the application correctly setsPAM_RHOSTvariable, or to deny remote logins completely. currently,/bin/login(invoked fromtelnetd) andgdmis OK, others may be not π¬
like, fr fr, check your PAM_RHOST before you catch feelings or security holes π
π SEE ALSO π
console.perms(5)console.apps(5)console.handlers(5)pam_console_apply(8)/usr/share/doc/pam*/html/index.html
go read these if you want the full lore iykyk πβ¨
π BUGS π
let's hope not π but if you find any, please report them via the "Bug Track" link at http://bugzilla.redhat.com/bugzilla/ β do your civic duty bestie π«Ά
π AUTHORS π
- Michael K. Johnson
<johnsonm@redhat.com> - Support of
console.handlersand other improvements by Tomas Mraz<tmraz@redhat.com>
absolute icons, both of them ππ
and that's the page!! brought to you by Red Hat, dated 2005/10/4, and it's the pam_console(8) manual page β periodt π
πβ¨
π¦ where this page comes from
- centos-stream 9: pam 1.5.1-30.el9 Β· BSD and GPLv2+
- centos-stream 9: pam 1.5.1-30.el9 Β· BSD and GPLv2+
- Copyright 1999 Red Hat Software, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms