How do I configure PAM to only allow particular users login via sshd?

Updated -

Release Found: Red Hat Enterprise Linux 5

PAM module pam_listfile.so can be used for this restriction.

Firstly, please create the allowed userlist file. Each line of the file is one username. Assume that the file name is /etc/sshd_userlist, and put the allowed user names in it:

redhat
root
user1

The...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.