Operating System - HP-UX
1752770 Members
4788 Online
108789 Solutions
New Discussion юеВ

yppasswd and NIS passwd maps update

 
SOLVED
Go to solution
Kong Kian Chay
Regular Advisor

yppasswd and NIS passwd maps update

HP-UX 10.20 System. Using NIS password maps & NFS-mounted Home-Dirs.

When a user changes his password via commd "yppasswd" at NIS Client, the NIS Master "/etc/passwd" file is auto-updated (verified via "ll" and "grep userid" before & after). However, the NIS passwd maps (passwd.byuid, passwd.byname) are not auto-updated (verified via "ll" and "yppoll" a few hrs later). We update these NIS password maps by running a cron job commd "ypmake passwd" during 12am daily.

Questions :
a) Is running a cron "ypmake passwd" the officially correct way to update NIS passwd maps when there are password changes via "yppasswd" on NIS Clients ? Is there a config file somewhere on NIS Master that sets the auto-update of the NIS passwd maps when clients issue "yppasswd" at NIS Clients ?
b) How do I find out whether we are using NIS+ or NIS, and it's version ?
5 REPLIES 5
Tim D Fulford
Honored Contributor

Re: yppasswd and NIS passwd maps update

Hi

ypmake will re-distribute your maps. However you are correct there are other "better" ways of transfereing the maps, yppush on your master, ypxfr on slaves
yppush passwd
on your slave
ypxfr passwd
These are usually croned in say twice a day.

You are using NIS as NIS+ uses different commands. You can look for the the ypinit/ypbind/ypserv process depending if you are on a master/client/slave (not in any particular order).

Tim
-
Kong Kian Chay
Regular Advisor

Re: yppasswd and NIS passwd maps update

Tim

I understand that "yppush" and "ypxfr" commds are for updating the NIS Maps between NIS Master and NIS Slaver Servers. But I'm actually wondering why "yppasswd" auto-updates the source /etc/passwd on NIS Master BUT did NOT auto-update the NIS Master passwd maps i.e. passwd.byuid and passwd.byname
Sorry for not being clear in my post.
Ravi_8
Honored Contributor

Re: yppasswd and NIS passwd maps update

Hi
'ypmake passwd' pushes the passwd file map from master to clients.There is no any config file that modifies the map whenever user changes his password(can do it using cron periodically).

u can find whether u r using sna by listing the software(swlist)
never give up
RAJESH GANGADHARAN
Regular Advisor

Re: yppasswd and NIS passwd maps update

hi
if u are using commands starting with yp, u are using NIS
if u are using NIS + , none of the yp commands work

Let the choices you make today be the choices you can live with tomorrow.
Shannon Petry
Honored Contributor
Solution

Re: yppasswd and NIS passwd maps update

The simple answer to your question is yes, and no...

A cron job should always be setup to transfer maps at specific times.

TO pull from clients...There are several default ypxfers built into HP-UX, which should be scheduled roughly.

/var/yp/ypxfr_1perhour
/var/yp/ypxfr_1perday
/var/yp/ypsrc_2perday

In a big NIS environment, you may have to create and transfer the 1per hour much more than the default... If clients bind to a slave, the passwd may have been changed on another machine, but will not be available to all for 1 hour.

Otherwise, you can run yppush from the server in a similar fashion. Because not all maps are updated regularly, I usually force a complete ypmake at 12AM and 12PM daily, and force a complete map transfer from slaves then too...

Regards,
Shannon
Microsoft. When do you want a virus today?