prevent user from logging in by time of day

chicodoggy

machead since 91
is there any way to prevent a user ( my son ) from logging into my mac when im not home and getting on the net.

i either need to limit his login ability by a certain time of day ( after 5) or i need to find a way to block his access to my finder and therefore IE and other apps.

i didnt have any problem with this under os9 :(

if not, can anyone recommend a good way to child proof IE or Netcape via software, etc.
 
A reasonably straightforward way would be to whip up a pair of shell scripts. One of these for locking the computer down, and the other for opening it up again. You could then put these scripts into cron so that they run at a given time each day, or you could run them manually with a double click.

Now, I'm sure there are easier ways around, but if I put this up on the board, we're bound to get 3 or 4 people telling us ways to make it simpler.

I'm going to assume that you have an account for yourself and an account for your son. Make sure that these are set up so your son doesn't have administrator privileges.

Then, take any apps you want to be able to lock (lets say IE and NetScape for now) and drop them into their own folder within apps called "Lockup".

Open a terminal, and set yourself as the owner of Lockup. (chown myaccount /Application/Lockup )

Now, you'll want to open your favourite text editor (not word processor, we're saving plain text here!) and enter these scripts.

File sys_lock.sh:

#!/bin/sh
chmod 700 /Applications/Lockup
echo "System is locked."

File sys_unlock.sh:

#!/bin/sh
chmod a+r /Applications/Lockup
echo "System is unlocked."

Now, from here you can see how you could expand it to include other folders or files as well, just by doing the same steps.

If you are a little afraid of the terminal, you could simply move the apps into a directory within your home folder when you want to deny access to them. This would mean a little fiddling around, but should work. The advantage of the scripts is that you can put them into your /etc/crontab file to have them automatically run at given times of the day (cron will also account for you leaving the computer off or sleeping, too, so no worries there).
 
Alternately, it should be possible to lock out your son's user account in a very similar manner, which would be more reliable. Can anyone help us out with this?
 
I would say that you could use a program called Watcher. It regulates the amount of time a person can stayed logged in per day. Once he goes passed his limit, he can't log in.

I am looking for a similar thing for a network and am having no luck, but I'm sure this will help you.

All you would have to do is set up his account to let him use it for so much time and then at night you would have to go in and make sure that he used all the time and then deplete his account.

You can find a link to the file on VersionTracker.

Andrew
 
Back
Top