Operating System - HP-UX
1823279 Members
3286 Online
109648 Solutions
New Discussion

Setting Up An NIS Account with an Expiration Date

 
Andrew Kaplan
Super Advisor

Setting Up An NIS Account with an Expiration Date

Hi there --

I would like to set up and NIS account that expires on a specific date. What is the best way to do this? Thanks.
A Journey In The Quest Of Knowledge
1 REPLY 1
Grayh
Trusted Contributor

Re: Setting Up An NIS Account with an Expiration Date

The following link might help

http://www.adager.com/VeSoft/HpUxSecurityConcerns.html

and then:

ypcat (group, passwd)
ypstart # linux
ypbind
ypinit # client, specify machines to bind to
# server, specify whether master or slave
ypwhich # tell what NIS server machine is bound to.
passwd
yppasswd (obsolete, for combatibility only)

ypcat -k auto.master (-k to display the key name too!)
ypcat -k auto.direct (the direct map, use /-)

/var/yp/binding/DOMAIN/ypservers # list of ypservers that can be used (non broadcast mode)



passwd

pwconv update shadow file based on new user additon to passwd (does not set password)
passwd [uid] change password for user
chown [uid]:[gid] /home/[user] change user home dir ownership


shadow fields (all numbers are in days):
eg: username:cV5MnNBnaUIbM:13362:0:99999:7:::
[---1--] [-----2-----] [-3-] 4 [-5-] 6 (78)
1: username
2: encrypted password
3: last password change - days since 1970/01/01. Substract this number by:
12775 = days since 2005/01/01
13140 = days since 2006/01/01
13505 = days since 2007/01/01
4: password next change - 0 means password can change at any time.
5: password req change in X days - 99999 means next life time :)
6: warning for expiration
7: account disactivation in X days - usually empty
8: acc expiration - usually empty
9: reserved


w change : allowed next change :


---

NIS+

nismatch -M name=tin passwd.org_dir
nismatch tinh passwd
nismatch grpname netgroup.org_dir

nisgrep ...