Interview Prep/Linux/SSH, sudo and authentication

A user gets `You are required to change your password immediately (administrator enforced)` and the change fails over SSH with `Authentication token manipulation error`.

IntermediateTroubleshootingSSH, sudo and authentication
Answer

Likely causes → The password is forced to change (chage -d 0), and the update fails because /etc/shadow is not writable (read-only root, wrong SELinux label, immutable attribute) or pwquality rejects it.

Diagnose →

sudo chage -l alice
lsattr /etc/shadow; ls -lZ /etc/shadow
findmnt -no OPTIONS /
sudo journalctl -t passwd -n 20

Fix → Fix the shadow file issue (chattr -i, restorecon, remount rw), or set a password as root: passwd alice.

Prevent → Avoid immutable flags on auth files; monitor for read-only root.

All Linux questions Roadmap: Linux

More on SSH, sudo and authentication