Take the 2-minute tour ×

I'm not sure how to word this. I would like to be able to, remotely, lock down my kids' access either for an amount of time, or have lock/unlock control. Basically, I want to lock out an account temporarily until I unlock it remotely.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

A quick-and-dirty solution would be:

  • ssh into the box
  • change the password of the user your kids log in with ("sudo passwd kiddies")
  • issue "sudo poweroff"
  • tell them to finish their homework before they can use the machine again.

There may be better ways to disable a user account without changing the password, such as

sudo usermod --expiredate 1 kiddies


sudo passwd -l kiddies

and to unlock:

sudo passwd -u kiddies
share|improve this answer
I don't mind the CLI SSH way. I was maybe hoping for a web gui type control. I could script that and make it part of my web page. –  peck Sep 6 '11 at 2:23
Well, if you run a website on that machine which is accessible from outside then it's just a matter of invoking a few shell commands from there. Alternatively, you can install Webmin/Usermin for a full-scale user management solution, but that might be an overkill. –  Sergey Sep 6 '11 at 2:38
No such thing as overkill. I'm going to play around with the scripting. My website is not on that computer but part of the same subnet. Might be a nice open source project. No such thing as big brother when your a Dad. –  peck Sep 6 '11 at 2:53
Note that administrative password changes can cause problems with other parts of the system. For example, the keyring is encrypted using the user's password and a PAM module is used to re-encrypt it when the user changes their password. This can't happen when an administrative password change occurs. You can run into similar problems if you use encrypted home directories. –  James Henstridge Sep 6 '11 at 4:19
add comment

Not sure about doing it remotely, but you could just change the password and change it back when they are allowed to have access again. You could try LogMeIn or Teamviewer.

share|improve this answer
add comment

You could do it with a root cron job that creates and deletes /etc/nologin

See "man login" for information. It prevents non-root logins.

Of course, when you create /etc/nologin you'll still have to deal with the logged-in users.

share|improve this answer
add comment

Your Answer


