Operating System - HP-UX
1833788 Members
2076 Online
110063 Solutions
New Discussion

NIS and Expired passwords.

 
Michael Selvesteen_2
Trusted Contributor

NIS and Expired passwords.

Hello All,

I have a NIS setup which takes care of user login in my network. I am in need to force an user to change password at the next login by expiring the password. for NISPLUS it can be done with
nispasswd -f username

How it can be achieved in NIS ?

Advance thanks for your help...

1 REPLY 1
Dave Olker
Neighborhood Moderator

Re: NIS and Expired passwords.

Hi Michael,

The easiest way I've found to do this is to add the string ",." to the users' encrypted password string in the /etc/passwd file (or whatever file is used to build the passwd NIS map) on the NIS Master server. For example:

OLD: testu:wBCSmXWwbieiE:107:20:,,,:/home/testu:/usr/bin/ksh

NEW: testu:wBCSmXWwbieiE,.:107:20:,,,:/home/testu:/usr/bin/ksh

Then rebuild/distribute the passwd maps with ypmake.

By adding the ",." to the end of the encrypted password string, this effectively tells the system that the password has expired and must be changed at next login.

I've tried this on my NIS Master system and it seems to work fine.

Hope this helps,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo