chage -l <username>
Beispielausgabe:
Last password change : Dec 17, 2015
Password expires : Mar 16, 2016
Password inactive : never
Account expires : never
Minimum number of days between password change : 7
Maximum number of days between password change : 90
Number of days of warning before password expires : 14
for n in $(sudo cat /etc/shadow | awk '{FS=":";print $3}'); do date -d "01/01/1970 +${n}days" +%F; done
Um den nutzlosen-use-of-cat-Award zu vermeiden:
for n in $(sudo awk '{FS=":";print $3}' /etc/shadow); do date -d "01/01/1970 +${n}days" +%F; done
Melden Sie den Passwortstatus für das benannte Konto passwd -S username
for user in $(cut -d: -f1 /etc/passwd); do sudo passwd -S $user; done