D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Restricting logon times for normal users

 

stinga@xxxxxxxxxxxxx wrote:
> If you are going to change the passwd file you could change the user  
> shell script to powerdown, so when she logs in it shuts the machine  
> down.
>
>   
This got me thinking.  Is there any way I can check what time it is when 
the machine boots?

What I mean is, if I get the machine to change the passwd file and 
shutdown with a cron job then is it possible to check at bootup if the 
machine has been booted when we're going to let her use it?

For example...

Say she is using the machine after 9pm, a cron job runs, changes the 
passwd file and shuts the machine down, so if she tries to turn the 
machine on again it will not let her login.

The next day when she turns the machine on (say after 9am but before 
9pm) I want it to check at boot up if it is okay to login, if it is then 
copy the passwd file back so she can login.

Does this make sense?

Rob


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html