Re: User Time Restrictions on Solaris 8

From: Saad Kadhi (bsdguy@docisland.org)
Date: 05/01/02


From: Saad Kadhi <bsdguy@docisland.org>
To: dweise <dweise@rider.edu>
Date: 01 May 2002 20:12:58 +0200

On Wed, 2002-05-01 at 01:20, dweise wrote:
> Hello,
> Is there anyway to set time restrictions for users on Solaris 8? (Other
> NOS that can do this is Novell) For Example: Set user bsombdy account so
> that they can log on from 8am to 6pm.
You can force *all* users to log from 8am to 6pm by creating (via cron
for example) /etc/nologin at 6:01pm and deleting it at 7:59am.
Otherwise, you can cook very easily a small script that will change the
shell field of users to /bin/false in /etc/passwd for example at 6:01pm
each day and restoring their normal shell at 7:59am. It can read its
input from a file that contains sth like :
# user mintime maxtime
foo 8:00am 6:00pm
bar 7:00am 10:00pm
...

but note that in both approaches, once a user is logged then the system
won't kick them at 6:00pm (if this is their maxtime). But there are ways
to do that (killing the user shell for example but this is not really
clean)

HTH

-- 
Saad -- [pgp keyid: 35592A6D http://pgp.mit.edu]
[pgp fingerprint: BF7D D73E 1FCF 4B4F AF63  65EB 34F1 DBBF 3559 2A6D]
# booth slave for hire



Relevant Pages

  • Re: User Time Restrictions on Solaris 8
    ... On Tue, 30 Apr 2002, dweise wrote: ... > Is there anyway to set time restrictions for users on Solaris 8? ... > NOS that can do this is Novell) For Example: ...
    (Focus-SUN)
  • Re: User Time Restrictions on Solaris 8
    ... > Is there anyway to set time restrictions for users on Solaris 8? ... >NOS that can do this is Novell) For Example: Set user bsombdy account so ...
    (Focus-SUN)
  • Re: User Time Restrictions on Solaris 8
    ... > Is there anyway to set time restrictions for users on Solaris 8? ... > NOS that can do this is Novell) For Example: Set user bsombdy account so ... It ought to port PDQ to Solaris ...
    (Focus-SUN)