3

I am looking for a way to edit and enforce log on hours for individual users on a machine.

So far, from what I have been able to find, 2 tools (timekpr and gnome nanny) arent available for use in the newer versions of Ubuntu.

I tired using PAM and editing the time.conf file located in /etc/security/ to set log on hours for users, however, it didnt seem to work. No matter what I set, after rebooting it didnt enforce the rules that I set.

How can I set log on hours for users? Are there any other programs or applications that help with this? Im using Ubuntu 13.10.

Also, are there any applications that allow me to manager user accounts remotely from another machine, sort of like how MMC console in Windows works?

Olli
  • 9,129

1 Answers1

2

To use the PAM time module edit /etc/security/time.conf with your desired access limitations. The line below restricts USERNAME to system access 7am to 10pm, everyday of the week.

*;*;USERNAME;Al0700-2200

Now you need to enable the time module in the service that controls system logins.

To enable the time module in lightdm edit /etc/pam.d/lightdm to include:

account required pam_time.so

You can also add that line to /etc/pam.d/gdm if you use gdm instead of lightdm

To enable the time restrictions across all service edit /etc/pam.d/login.

You should find: # account required pam_time.so.

Remove the comment mark to enable it.

Sean
  • 1,953