APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

© March 2005 Tony Lawrence

2005/03/14 pam_console.so

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:

The /etc/security/console.apps/ directory should contain one file per application that wishes to allow access to console users. The filename should be the same as the servicename, and the contents are irrelevant; the file may be a zero-length file. The application that the file is used by is free to specify the contents in any way that is useful for it.

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.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> 2005/03/14 pam_console.so

Inexpensive and informative Apple related e-books:

Take Control of Numbers

Sierra: A Take Control Crash Course

Take Control of Pages

Take Control of High Sierra

Take Control of Automating Your Mac

More Articles by © Tony Lawrence

Printer Friendly Version

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

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)

Linux posts

Troubleshooting posts

This post tagged:




Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode