Operating System - HP-UX
1833029 Members
2417 Online
110049 Solutions
New Discussion

how to disable nis client and nis server.

 
SOLVED
Go to solution
ccv
Occasional Contributor

how to disable nis client and nis server.

Hi
I want to migrate all the uids which are currently administered thru nis to /etc/passwd and then I want to disable nis on the server, becuase now we have a new DNS server in our environment.
Are there any standard steps for this migration.
The server is in production and its acting as nis server and client both, also no other server is client to it.
Do we require any downtime for this?
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: how to disable nis client and nis server.

Shalom,

vi /etc/rc.config.d/namesvr

You can change the startup characteristic.

Either restart the server or use the nis.client and nis.server programs to stop the daemons in /sbin/init.d

If your NIS setup has the new NIS master and the old NIS master in the client setup, then downtime is not strictly required. I'd warn my users though, mistakes are possible.

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
TTr
Honored Contributor

Re: how to disable nis client and nis server.

> migrate all the uids which are currently administered thru nis to /etc/passwd

Is this server the NIS master? If so there is no need to migrate anything to /etc/passwd unless you have a different password file from which you built the NIS map.

1. Update /etc/passwd, /etc/group if needed and remove the "+" directive.
2. Change /etc/nsswitc.conf to use "files" for the passwd and group and "files dns" for hosts.
3. Stop the NIS server and client processes using /sbin/init.d/nsi.client stop, /sbin/init.d/nis.server stop

4. Disable the NIS in /etc/rc.config.d/namesrvs to prevent them from starting up again. Change the "1" to "0".

All this can be done live but do it when the server is least active. Perform many tests when done.
ccv
Occasional Contributor

Re: how to disable nis client and nis server.

Hi all

Thanks a lot for the answers.
This server is NIS master and client both, also there is no other client associated to it.

There are number of uids in the passwd.byname which are not present in /etc/passwd, and these uids are active too. How can I migrate these uids from passwd.byname to /etc/passwd? Will just a copy and paste will do or is there any specific command or process for this?
Also Please let me know if there are any other important nis maps to migrate like this to the local files.

Again thanks for all the answers.
TTr
Honored Contributor

Re: how to disable nis client and nis server.

ypcat passwd will give you the active NIS users. Check your groups too with "ypcat group". Then do a diff from /etc/passwd and /etc/group and yes cut and paste.

By default all the default NIS maps are created in the NIS server. Look in /var/yp/ to find all the maps and ypcat them and diff them from the source file in /etc to see if there is anything new in them. The hosts and aliases maps are the next ones to check. The remaining ones are rarely used.
The maps are also listed in /etc/rc.config.d/namesrvs in one of the variable sections and inside the ypinit script.
Safarali
Valued Contributor

Re: how to disable nis client and nis server.

NIS is using for mainly for user administration and other network relatied issue like adding printers and working directory like AutoFS
before disabling NIS make carefull study and make a detail action plan
check all the user in system
and working directory, shell etc
check NIS using same password file /etc/passwd
some system due to security they are using diffrent passwod files
DNS is using name resolutions,if you are implementing ldap for NIS, then you can disable NIS, I do not understand for DNS why you disabling NIS

Regards
Safar
ccv
Occasional Contributor

Re: how to disable nis client and nis server.

Hi TTr

Thanks a lot for detailed reply. I unconfigured the nis from server successfully after updating local file from /nis maps.