RedHat gives console users additional privileges through this PAM module. If an ordinary user logs in at one of the console screen, and no other user is already logged in at another console tty, all the files listed in /etc/security/console.perms have their permissions and ownership changed so that user owns them. It's quite a list of files, including the floppy drive, cd, keyboard and so on. You can, of course, edit this file to cut down on the list.
In addition to files, /etc/security/console.apps/ contains references to applications that this console user can run. The references are files, but the contents are interesting in that "man console.apps" says:
Indeed, while most of the files there have similar content, at least one (xserver) is empty on my machine. However, just because a file is there does NOT mean that the console user can have free rein: the program to be run must be PAM aware, and pam_console.so must be referenced in its /etc/pam.d setup. On my RedHat system, for example, /etc/security/console.apps/ contains quite a few files, but only a few of them have the required pam.d entries, so the console user would not be able to use them.
If you want to remove one or more of those that are left, I suggest removing the files from /etc/security/console.apps/ AND commenting out the pam_console.so entry in the /etc/pam.d file. That makes it definite that the user won't have the access if files get accidentally or maliciously restored to the console.apps directory.
Whether console users should have ANY extra privileges is another discussion. It's certainly convenient, but convenience is always a threat to security. Small privileges can be escalated to major security breaches. That's why I recommended doing both removals above: the more roadblocks in place, the less likely anything can slip by. It's the same reason that I shut off unneeded services even if those services are blocked at the firewall: if the firewall fails, at least the services aren't waiting with open arms. In this case, if the decision was made to not grant any extra privilege, you might consider removing or renaming the pam_console.so library also - just another security step, though perhaps more drastic than most as it would make the console pretty much unusable for ordinary users.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2009-11-07 Tony Lawrence
The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code. (Paul Graham)
Printer Friendly Version
pam_console.so: Tech Words of the Day Copyright © March 2005 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version