For security reasons, I want to make it so that only root can change user's passwordsThis can be achieved if I set /usr/bin/passwd to 700. Now, if password aging is enabled or first login is enabled, when a user logs in with successful or expired password, he is requested to chose a new password. I want to disable this behavior.OUTPUT:login as: testUsing keyboard-interactive authentication.Password:Using keyboard-interactive authentication.Password change requested. Choose a new password.Enter current password:Expected Output:login as: testUsing keyboard-interactive authentication.Password:Using keyboard-interactive authentication.Your password has expired. Please contact root to change your password.I want a workaround to achieve this. I have done a little research, but I am not sure what entry needs to be added to the pam module. Can anyone help me on this?
Block regular users from changing their passwords: only root should be able to
ssh;security;password