1833846 Members
1999 Online
110063 Solutions
New Discussion

NIS Problems

 
Barry Lake
Occasional Advisor

NIS Problems

Hi, I have inherited some HP-UX 11.0 systems that were left in terrible disarray. These systems are running NIS and/or NIS+, and I have no experience with these products, unfortunately. My immediate problem is that I need to gain access to the data in the passwd.org_dir file. When I try doing "niscat passwd.org_dir" while logged in as root with my current directory set to passwd.org_dir's parent directory, niscat just hangs. It gives no output, and it never returns. I have to hit ctrl-c to get out. Can someone please give me some hints as to what I need to do to get this to work? Thanks!
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: NIS Problems

Shalom,

First step in an ugly process.

See if the nis daemons are running.

The start/stop scrips are in /sbin/init.d

They start with nis, there is a server or client program.

stop the client
stop the server
start the server
start the client

Take a look at the config files in /etc/rc.config.d/namesvrs and see what the intent of the setup is.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Barry Lake
Occasional Advisor

Re: NIS Problems

Steven, thanks for the reply. I found the following:

1) On one of the three servers the NIS_DOMAIN setting in the /etc/rc.config.d/namesvrs config file was different from the other two. I fixed that so all three servers have the same NIS_DOMAIN.

2) On all three servers I confirmed that the namesvrs config file has

NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=0
NISPLUS_SERVER=1
NISPLUS_CLIENT=1

3) ps -ef on each of the three servers showed a different set of demons running. One had rpc.nispasswdd, another had rpc.nisd and the third had nis_cachemgr. Also a couple of them had keyserv.

4) On all three servers I stopped the demons with

# /sbin/init.d/nisplus.client stop
# /sbin/init.d/nisplus.server stop

5) On all three servers I started the demons with

# /sbin/init.d/nisplus.server start
# /sbin/init.d/nisplus.client start

6) On one of the three servers ps -ef shows:

# ps -ef | grep nis
root 23889 1 210 15:01:40 ? 10:03 /usr/sbin/nis_cachemgr
root 23852 1 20 15:00:26 ? 1:52 /usr/sbin/rpc.nisd

On another I see:

# ps -ef | grep nis
root 20418 1 205 14:52:03 ? 9:55 /usr/sbin/nis_cachemgr
root 20387 1 0 14:51:01 ? 0:00 /usr/sbin/rpc.nispasswdd
root 20382 1 101 14:51:01 ? 7:28 /usr/sbin/rpc.nisd

On the third server ps -ef hangs now (didn't before) and never returns without ctrl-c. Incidentally, that's the same server where I changed the NIS_DOMAIN to match the other two.

7) On all three servers "niscat passwd.org_dir" still hangs.

Any more suggestions? :)

TIA,
Barry.
Barry Lake
Occasional Advisor

Re: NIS Problems

For the record, I did finally manage to gain access to the data in the passwd.org_dir file by adjusting the /etc/nsswitch.conf file. It originally had records in it like:

passwd: files
group: files
hosts: files
services: files

I changed it to look like:

passwd: files nisplus
group: files nisplus
hosts: nisplus [NOTFOUND=return] files
services: nisplus [NOTFOUND=return] files

Then I stopped and started the NIS+ servers again, and voila, niscat now works, and doesn't hang!

Thanks again to SEP, whose excellent suggestions got me going on the right track.

Regards,
Barry.
SupraTeam_1
Regular Advisor

Re: NIS Problems

Hi,
Can you test an "nisping -C" on server, nisls org_dir on host,niscat -o paswwd.org_dir on the server ? Give me the return

Regards
Barry Lake
Occasional Advisor

Re: NIS Problems

Closing thread from 2006; all pertinent data is in prior replies.