Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Limiting logins at specific times of day
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Tue Aug 15, 2006 4:22 pm    Post subject: Limiting logins at specific times of day Reply with quote

Would you just set up a daily cron to enable the account and another to disable it? If so, what command(s) are used to enable/disable a user account?
Back to top
View user's profile Send private message
chrbecke
Guru
Guru


Joined: 12 Jul 2004
Posts: 598
Location: Berlin - Germany

PostPosted: Tue Aug 15, 2006 5:32 pm    Post subject: Reply with quote

This can be done with PAM, I believe - but I can't tell you how to do it exactly. Have a look at /etc/security/time.conf, there are some example rules for limiting access to certain services for certain users at certain times. I guess you have to edit some files in /etc/pam.d/ as well. Have a look at the PAM docs.

If you go for the cron job, I think
Code:
passwd --lock <login name>
and
Code:
passwd --unlock <login name>
can be used to enable/disable the accounts.

HTH.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Aug 15, 2006 5:36 pm    Post subject: Reply with quote

you could use PAM to do this
have a look at /etc/security/time.conf and Security Handbook
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Tue Aug 15, 2006 5:44 pm    Post subject: Reply with quote

Quote:
you could use PAM to do this have a look at /etc/security/time.conf
This 15.5 Time Based Restrictions you may find helpful too.
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Wed Aug 16, 2006 4:19 am    Post subject: Reply with quote

Thanks everyone! You are each very helpful and informative.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum