Use the pam_time module in the Pluggable Authentication Modules (PAM) system to restrict login times.
Edit the /etc/security/time.conf file to specify time restrictions. You can define rules for specific users or groups.
Edit the /etc/security/time.conf
login ; * ; !gurudatta ; Wk0630-1500
This line denies login for all users except "user1" from Monday to Friday between 6:30 AM to 15:00 PM.
Ensure that the pam_time module is enabled and configured properly in the PAM configuration files (/etc/pam.d/).
No comments:
Post a Comment