How do i set password expiry for all users?
6,875
Edit /etc/login.defs
using a text editor:
vi /etc/login.defs
Edit these 3 parameters to what you want (example from the file and the defaults given):
#
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_WARN_AGE 7
Related videos on Youtube
Author by
Gorum
Updated on September 18, 2022Comments
-
Gorum over 1 year
I need to set the password expiry time for ALL users at once with the terminal, or at least by group. Is there any way to do this? Without using suspicious or sketchy software/sites? Thankyou!
-
Akshay about 7 yearsDo we need to restart any service after that? Or it is hot deployed?
-
Rinzwind about 7 yearsIt will be active as soon as it is saved.