LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pam time restrictions not working !!? (https://www.linuxquestions.org/questions/linux-newbie-8/pam-time-restrictions-not-working-782108/)

kingston 01-21-2010 02:58 AM

i have changed as you told, tinkster...but still i could log into the machine via GUI.....

AbsolutJav 09-02-2010 04:03 PM

Hi, there I'm new here and I have the same problem, but I finally make it work.

If you are working with gnome you have to add in "/etc/pam.d/gdm" the line "account required pam_time.so"

And them the restrictions on "/etc/security/time.conf".

And that's it.

Cheers!

suthagarka 09-02-2010 07:10 PM

Hi Kingston,

This very interesting. You might have already done this, if not please place account required pam_time.so as the first line of /etc/pam.d/login.

The next thing to notice is your login logs. If you check /var/log/secure after a test login and log-off, you will see an entry such as pam_unix(sshd:session)... or pam_unix(gdm:session)... based on your login method.

If you see these add an additional line to/etc/pam.d/sshd session required pam_time.so. Now do the same to /etc/pam.d/gdm if you need to restric GUI access.

Unfortunately this is the drawback of PAM's modular approach.

Thank You


All times are GMT -5. The time now is 03:11 PM.