PDA

View Full Version : [SOLVED] PAM authentication help



dragos2
April 8th, 2010, 07:28 AM
Hi guys,

I need some help with PAM and authentication of users.

I want to define for each user when he can login, something like:

user1:monday to friday from 8 to 18
user2:monday to friday from 8 to 16
user3:anytime

Can this be done ? How ?

Thank you

HermanAB
April 8th, 2010, 03:08 PM
Hmmm, RADIUS does that.

The usual Linux authentication systems only deal with user names and passwords.

So, you could look at this old guide:
http://www.aeronetworks.ca/radius.html

Or you could use the pam_time module:
http://articles.techrepublic.com.com/5100-10878_11-1055269.html

bluefrog
August 17th, 2010, 09:50 AM
edit /etc/security/time.conf

add the following lines

*;*;user1;AlWd0800-1800
*;*;user2;AlWd0800-1600

no need to add anything for user3, he is allowed to do whatever whenever.

Then add the following line to /etc/pam.d/common-account

account requisite pam_time.so