5

Is it possible to make linux require user password only during specified time range, eg. from Monday to Friday? I want to set it this way on my Linux Mint, so that kids cannot access computer on school days without permission, but still allowing to login with password on school days...

EDIT: By login I mean logging in to system using gui

burtek
  • 643

1 Answers1

2

This is possible... You make a bash or a programe that change password or disable account for kids on specific day, and than return correct password or account in weekends.

The programe that is responsible for change password or disabeling accounts should be in ~/.xinitrc or some other file that runs before login...

if [[ $(date +%u) -gt 5 ]] ; then
    //Your programme
fi

For additional information check...
- Disabling User Accounts
- Running bash at start up

Im running minimal debian with wmii so i put my start up bash in ~/.xinitrc you can chose some other file that run at different run level.

Hope it helps... :)