3

I have Ubuntu 18 OS and I am trying to prevent all users from running 'chpasswd' command after 17:00 o'clock. I need to use pam for this.

My /etc/pam.d/chpasswd file:

# The PAM configuration file for the Shadow 'chpasswd' service
#

@include common-password

password required       pam_pwquality.so retry=3
account required pam_time.so

My /etc/security/time.conf file:

chpasswd;*;myUser;!Al1700-2400

I don't know why it does not work. I can run this command all day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.