Link to home
Start Free TrialLog in
Avatar of raslan
raslan

asked on

how to configure the Nis Server on SUSE

how to configure the Nis Server on SUSE

plz i need detailed explanation , and all the files setup
Avatar of johnnyp
johnnyp

Not being a SUSE user, but Solaris and Slackware, I hope the yp commands are in the same place.  

First of all, plan your domain, i.e. do you need a slave server at all etc. etc.

Then on your proposed server, run the domainname command to set your NIS domain.  To ensure this remains set when you reboot the system you need to enter the same information in a file called /etc/defaultdomain (doesn't exists by default).

You must decide whether you want to keep your local files, that can be managed by NIS seperate from the NIS files, useful if you want the local machine to provide services unique to itself.  The general files under NIS control are all under /etc: bootparams; ethers; group; hosts; aliases; netgroup; netmasks; networks; passwd; protocols; rpc; services.  If these files do not exist, then just create them with the touch command.

I normally put these in a seperate dir called nismaster.  It keeps my NIS stuff completely seperate.  You will however need to edit the /var/yp/Makefile to identify the new location.

To alter the default NIS file location edit the following entries in the /var/yp/Makefile:

DIR=
PWDIR=
ALIASES=

Then, on the master, run the command:

#/usr/sbin/ypinit -m

This will ask you to enter any further NIS servers, so just enter Ctrl^D and continue with the initialisation of the master.  The NIS maps will be generated from the standard files used by NIS and will be located within the /var/yp tree structure.

Once the initialisation is finished, startup the NIS server daemon /usr/sbin/ypserv.  To start NIS on bootup, edit the /etc/rc.d/rc.inet2 file and uncomment the sections that run the ypbind daemon and the ypserv daemons.

You will need to set the nsswitch.conf, which has a little description of its use at the top of the file.  THere may well be a nsswitch.conf-nis or nsswitch.nis file that can be used to replace the default nsswitch.conf file.  You may however, still need to alter this file as it could be using NISPLUS instead of NIS.

If you also use DNS, you will need to make sure that the hosts line in nsswitch.conf has 'DNS' on it.  ALso, your system may have a host.conf file which will need to be set to:

order nis, hosts, bind (or dns).

On the client machines-

Make sure you have set the defaultdomain with the domainname command and created the defaultdomain file.
Add the following to the bottom of the /etc/passwd file:

+:*:0:0:::

and:

+:*:*

to /etc/group

These lines basically tell the system to include the NIS maps when authenticating.  If you will be using the netgroup NISmap, then you can add netgroups to the /etc/passwd file to further restrict access to individual systems.

ALter the nsswitch.conf file as with the master.

Once again, as with the server, edit the /etc/rc.d/rc.inet2 file to uncomment only the ypbind daemon startup script and run ypbind.

Check that it is binding correctly to the right NIS server with the ypwhich command.

I don't think I've missed anything!!!!!

Hope it works :-)

See, I missed something!!!!

I forgot to mention that when you alter a file under NIS control, only do it on the Master and run the make command from within the /var/yp directory.

jonnyp,

I recommend you post an Answer to this question.  Raslan is prone to deleting them when he gets the answer - he did it to me and several times since.


In the following DELETED question, I sent him 7 pages of complicated code by email and I followed up with over an hour of email help. Then he deleted the question.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=10217255 

You worked for your points. Get them.

Mac
Hmmmm!!!!!  OK, thanks MacRena, I shall post the above as an answer.

Cheers
ASKER CERTIFIED SOLUTION
Avatar of johnnyp
johnnyp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of raslan

ASKER

well i am very sorry macrena i didn't know i think that the question got deleted  automatically bcs i never delete any question ,any way i am really sorry , if i owe any one point plz send me an email .

raslan1999@hotmail.com
Avatar of raslan

ASKER

well i am very sorry macrena i didn't know i think that the question got deleted  automatically bcs i never delete any question ,any way i am really sorry , if i owe any one point plz send me an email .

raslan1999@hotmail.com
raslan - I will not interfere with any more of your threads.  I do not believe you, but I am done.
Mac
Raslan, are you ever going to grade this answer?  It has been a long time since I proposed the answer!!!!!