United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
In order to enable password aging in Linux, the shadow file is used.
Password aging is not managed in the /etc/passwd file with Linux, unlike other systems.
In /etc/login.defs, define PASS_MAX_DAYS to 90 instead of the default 9999:
PASS_MAX_DAYS=90
Or set the password aging for a particular user using the following comand:
chage -M 90 username
Run the command authconfig and make sure shadow passwords are enabled. NIS by default will not build the shadow file.
Edit the file /var/yp/Makefile and make the following changes:
MERGE_PASSWD=falseIn the line all:, add shadow before passwd as follows:
all: shadow passwd group hosts rpc services netid protocols mail
Run the makefile. It will create a new map shadow.
Now NIS holds the password aging information, which can be seen by the following command:
ypcat shadow.byname | grep user