Created
November 15, 2019 11:10
-
-
Save Winding6636/959b51421f17e4b8b34df7e0bdb4202b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change the max password days to 99999 | |
cat /etc/shadow | cut -d: -f1 | xargs -I {} chage -I -1 -m 0 -M 99999 -E -1 -W 7 {} | |
sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 99999/' /etc/login.defs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment