Get date of last password change2012/12/21 |
For example, Get the date of last password change for users who set password. |
#!/bin/bash for line in `egrep -v ':\*:|:!|^\+|^\$' /etc/shadow` do user=`echo ${line} | cut -d: -f1` last=`chage -l ${user} | head -1 | cut -d: -f2` echo -e "${user} : ${last}" done |
|