Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Networking > Issue <<  326 of 354 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 11121
Last update: 08-13-07
Issue:
How do I enable password aging with NIS?
Resolution:

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=false
In 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


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Networking > Issue <<   326  of  354  >>