Re: restricting users during certain times/days
From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 02/02/04
- Next message: Daeron: "MICROS~1 front company trashes Red Hat"
- Previous message: Kadaitcha Man: "Re: What's this mean?"
- In reply to: Lew Pitcher: "Re: restricting users during certain times/days"
- Next in thread: Mike Cox: "Re: restricting users during certain times/days"
- Reply: Mike Cox: "Re: restricting users during certain times/days"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 2 Feb 2004 22:37:03 +0100
Lew Pitcher <Lew.Pitcher@td.com> wrote:
> On Mon, 02 Feb 2004 14:27:46 -0800, "Mike Cox" <mikecoxlinux@yahoo.com> wrote:
> >Is it possible to control the times or days a user is allowed to login?
> >For example, if you only want a user to be able to login during the
> >weekdays. How would you set that up?
> Depending on how universal I wanted the restriction, I'd probably set up a
> couple of cron jobs
> 0 0 * * mon touch /etc/nologin
> 0 0 * * sat rm /etc/nologin
> see nologin(5) ("man 5 nologin") for details on what the /etc/nologin file does.
Yep, but then we are on a multi-user system, your approach might
be a bit dramatic and none might be able to login. I'd change
users shell to /sbin/nologin via 'usermod' from cron. Albeit, one
needs to make sure (log him off) that the user isn't still logged
in while the cron job runs.
However there's AFAIK even a pam module available for something
like this? The OP should check in addition the PAM docs.
-- Michael Heiming Remove +SIGNS and www. if you expect an answer, sorry for inconvenience, but I get tons of SPAM
- Next message: Daeron: "MICROS~1 front company trashes Red Hat"
- Previous message: Kadaitcha Man: "Re: What's this mean?"
- In reply to: Lew Pitcher: "Re: restricting users during certain times/days"
- Next in thread: Mike Cox: "Re: restricting users during certain times/days"
- Reply: Mike Cox: "Re: restricting users during certain times/days"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|