[SLE] Logging a user out
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 tarts 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 The first and third line worked fine under Mandrake 7.0 but the second line wouldn't run no matter what I did with it tried replacing shutdown now with init 0, halt, powerdown. None of it at all runs under SuSE 7.0. cron is running on the system so that is not it. Any help will be greatly appreciated. -- Regards Richard http://www.tollyboy.com -- 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
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
Hi Merlin, I
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
Tried this but it doesn't work either put it all in the /etc/crontab but none of it worked.
-- 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
-- Regards Richard http://www.tollyboy.com -- 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
Richard Davies wrote:
Hi Merlin,
I
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
Tried this but it doesn't work either put it all in the /etc/crontab but none of it worked.
I think you might need to add the full path to the binary, eg. /usr/bin/passwd I'm not sure what kind of environment cron jobs run under. 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
participants (3)
-
linux@tollyboy.demon.co.uk
-
merlin@mirramar.fsnet.co.uk
-
stephen@mirramar.fsnet.co.uk