Easy and Simple Solution

Thursday, May 27, 2021

Find password expiry date for all users

No comments

Check all user's password expiry date except system users on Linux based system.
for user in $(cat /etc/passwd |cut -d: -f1); do echo $user; chage -l $user | grep "Password expires"; done | paste -d " "  - - | sed 's/Password expires//g' | grep -v "never"

No comments :

Post a Comment

Real Time Analytics -->