After deploying a VM from a prepared image I'm being prompted to change the root password when I try to log into the server via SSH:
me@localhost:~ $ ssh 192.168.1.2
You are required to change your password immediately (root enforced)
Welcome to Ubuntu xx.xx.x LTS (GNU/Linux x.x.x-xxx-generic x86_64)
Last login: Mon Jul 26 09:01:55 2021 from 192.168.1.1
Changing password for root.
(current) UNIX password:
However, the account and password should be set to never expire. If I boot a rescue system and look at the account information I'm seeing this:
root@localhost:~# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
I've seen recommendations to use chage -M -1 root
, but that doesn't fix the problem for me.