1847587 Members
3745 Online
110265 Solutions
New Discussion

NIS resetting

 
Chris Petrell
Occasional Contributor

NIS resetting

Hello,
I am a solaris admin, needing a crash-course in HP-UX.. So.. Here we go! I recently got 3 J6000's machines, and many more are on their way. One of em I hosed the initial NIS setup. Is there a utility to reset the NIS to default? Kinda like sys-unconfig in Solaris? Is there any good documents I should look into to help me along? Any replies would be appreciated..
C.

PS: I am thrilled HP has a forum!
When they broke open molecules, they found they were only stuffed with atoms. But when they broke open atoms, they found them stuffed with explosions.
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: NIS resetting

You have a couple of options for redoing your NIS set up. The closest thing to sys-unconfig is set_parms. I think it is /usr/sbin, but I don't remember and I'm not at the office. set_parms will go through the whole machine and network setup that you saw when you initially booted the machine.

Your other option is to edit the /etc/rc.config.d/netconf file. This will have all of your NIS information in it. This is probably the easier option. Just bring the file up in vi, locate the appropriate section of the file and put in the correct information. The file is very well documented and it should be fairly straight forward for you.
Tommy Palo
Trusted Contributor

Re: NIS resetting

You can use SAM to do your NIS setup
# sam
Networking and Communications -> Network Information Service -> Actions
Keep it simple
Frederic Soriano
Honored Contributor

Re: NIS resetting

If you want to start from scratch, then vi /etc/rc.config.d/namesvrs, and look at lines prefixed by:

NIS_MASTER_SERVER
NIS_SLAVE_SERVER
NIS_CLIENT
NIS_DOMAIN

I consider that you are not using the NIS_DOMAIN domain anymore (i.e. no use of NIS maps).

If NIS_DOMAIN is set, just remind it for now.
If NIS_CLIENT is set to 1, as root, issue a /sbin/init.d/nis.client stop
If either NIS_MASTER_SERVER or NIS_SLAVE_SERVER is set, as root, issue a /sbin/init.d/nis.server stop

Then set NIS_CLIENT, NIS_[SLAVE|MASTER]_SERVER to zero, let NIS_DOMAIN equal to nothing, and save /etc/rc.config.d/namesvrs.

Then look at /var/yp/, if any.
If this directory exists, simply remove it. Or move it elsewhere if you want to test first.

Now two ways to start again :
* Use SAM, as Tommy instructed (see previous post)
* See ypinit(1m) to set your machine as a NIS master or slave server

If you are using ypinit(1m), do not forget to set appropriate values into /etc/rc.config.d/namesvrs to ensure automatic loading during bootup. If this machine is going to be a NIS client, then set NIS_CLIENT to 1. in all cases, do not forget to set domain name.

Then reboot or issue in the following order:
/sbin/init.d/nis.server start (if appropriate)
/sbin/init.d/nis.client start (if appropriate)

I hope this helps !

Best regards.

Fred.