>Does anyone know of a good way to have sshd check an arbitrary textfile
>full of usernames to determine whether or not to allow a login
>attempt?  I'm running RedHat Linux 5.2.
>
>The `AllowUsers' configuration option which is already part of SSH
>doesn't seem to take a textfile as an argument, so that won't work.
>
>I need to selectively allow user access to sshd based on the file
>/etc/sshd_users.  For example, if user "foo" is listed in
>/etc/sshd_users, he should be able to log into my server through sshd
>(after typing in his password and stuff).  However, the ssh login
>attept for "bar" would be denied and closed before he had a
>chance to authenticate since he wasn't listed in /etc/sshd_users.

AFAIK, there isn't a way to do this; perhaps this should be considered a 
feature request? (no, I don't have a use for it, but I can see how others 
would)

However, you could set the banned users shells to be /bin/false (or similar) 
to deny them access to the system.  Remember to put /bin/false in /etc/shells 
if you want to give them ftp access.

-- 
John Riddoch    Email: [EMAIL PROTECTED]        Telephone: (01224)262721
Room C6, School of Computer and Mathematical Science
Robert Gordon University, Aberdeen, AB25 1HG
I am Homer of Borg. Resistance is Fu... Ooooh! Donuts!

Reply via email to