Richard Davies wrote:
I am looking for a way to log a user out at a specified time at night and not let them back in until a specified time in the morning. I don't care what the user is doing I just want to throw them off the system and get back to the graphical login screen. The user name is kat I have tried the following with no success.
crontab -e
starts up vi no problems, wrote the following which should more or less work but nothing works at all. The first line should disable password for user kat at 22:59 it doesn't. The second line should shut the system down all I really want to do is get back to the graphical login screen but it doesn't do either The third line should reenable password for user kat so she can log back into the system like all of the others it does nothing.
59 22 * * * root passwd -l kat 00 23 * * * root shutdown now 00 08 * * * root passwd -u kat
Using crontab -e edits your own crontab files in which case you shouldn't have root in the entry, this is only required for the system crontab '/etc/crontab' The shutdown entry should be either shutdown -r now to reboot or shutdown -h now to halt. I think this should work, but not tried it personally. Regards Merlin -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq