Solved

how to configure the Nis Server on SUSE

Posted on 2000-03-29
9
760 Views
Last Modified: 2008-03-06
how to configure the Nis Server on SUSE

plz i need detailed explanation , and all the files setup
0
Comment
Question by:raslan
  • 5
  • 2
  • 2
9 Comments
 
LVL 1

Expert Comment

by:johnnyp
ID: 2680191
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 :-)

0
 
LVL 1

Expert Comment

by:johnnyp
ID: 2680199
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.

0
 
LVL 4

Expert Comment

by:MacRena
ID: 2716052
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.

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

You worked for your points. Get them.

Mac
0
 
LVL 1

Expert Comment

by:johnnyp
ID: 2716063
Hmmmm!!!!!  OK, thanks MacRena, I shall post the above as an answer.

Cheers
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Accepted Solution

by:
johnnyp earned 300 total points
ID: 2716073
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 :-)

One last thing, 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.



 
0
 

Author Comment

by:raslan
ID: 2728119
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
0
 

Author Comment

by:raslan
ID: 2728162
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
0
 
LVL 4

Expert Comment

by:MacRena
ID: 2728862
raslan - I will not interfere with any more of your threads.  I do not believe you, but I am done.
Mac
0
 
LVL 1

Expert Comment

by:johnnyp
ID: 2809888
Raslan, are you ever going to grade this answer?  It has been a long time since I proposed the answer!!!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Please explain to me named.stats file 4 51
FTP File Transfer Failure 13 114
linux 2 76
Linux : can't create transaction lock error 1 50
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now