console.perms(5)

πŸ“¦ version 1.5.1, in centos-stream 9

πŸ’– console.perms(5) β€” the permissions control file for users at the system console πŸ’–

okay bestie, this is console.perms(5), straight out of the System Administrator's Manual, and it's literally the blueprint for who gets to touch what when they're sitting at the console. let's get into it 🫢


✨ NAME ✨

console.perms β€” the permissions control file for users at the system console. yes, that's its whole job and it ate πŸ’…


🌸 DESCRIPTION 🌸

so listen. /etc/security/console.perms and the .perms files chillin' in the /etc/security/console.perms.d directory are the ones that decide two (2) things:

  • the permissions that get handed to privileged users of the console at login time
  • the permissions to which to revert when those users log out

and who's reading all this? the pam_console_apply helper executable. it's the main character doing the actual work πŸ‘‘

The format is giving:

<class>=space-separated list of words

login-regexp|<login-class> perm dev-glob|<dev-class> \
        revert-mode revert-owner[.revert-group]

now, the revert-mode, revert-owner, and revert-group fields are optional, and they default to 0600, root, and root, respectively. no cap, that's the fallback trio πŸŽ€

heads up: the words in a class definition get evaluated as globs if they refer to files, but as regular expressions if they apply to a console definition. do NOT mix them, bestie, i'm begging πŸ™ˆ

Any line can be broken and continued on the next line by using a \ character as the last character on the line. so you can keep it cute and readable, no pressure to have one giant unhinged line 🌈

The login-class class and the login-regexp word are evaluated as regular expressions. The dev-class and the dev-glob word are evaluated as shell-style globs. and here's a fun little detail: if a name given corresponds to a directory, and if it is a mount point listed in /etc/fstab, the device node associated with the filesystem mounted at that point will be substituted in its place. iconic substitution behavior, honestly πŸ”₯

Classes are denoted by being contained in < angle bracket > characters; a lack of < angle brackets > indicates that the string is to be taken literally as a login-regexp or a dev-glob, depending on its input position. iykyk πŸ’«


πŸ¦‹ SEE ALSO πŸ¦‹


🌟 AUTHOR 🌟

Michael K. Johnson <johnsonm@redhat.com> β€” the actual author of this whole situation, respect on the name fr fr πŸ’œ


and that's the page!! brought to you by Red Hat Software, dated 2005/5/2, which is lowkey giving vintage but she's still serving ✨ mwah, go configure your console permissions responsibly bestie πŸ’…πŸŽ€

πŸ“¦ where this page comes from