LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2005, 04:59 PM   #1
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770
Blog Entries: 1

Rep: Reputation: 34
Post Problem Configuring NIS Server in RHEL 4


Hello to All,
I am preparing for RHCE Exam.I have got a couple of problems while configuring NIS Server
in RHEL 4 AS .I followed the below listed steps to configure and the main problem is in NIS Client machines users home directory is not mounted showing mounting user in '/' .
rpms
ypserv
ypbind
yp-tools
I edited vi /etc/sysconfig/network and added NISDOMAIN="www.pjk.com"
#vi /etc/yp.conf
ypserver 127.0.0.1
Started the following daemons: portmap, yppasswdd, and ypserv.
created nis database:
cd /usr/lib/yp/
[root@www yp]#./ypinit -m
services ypbind and ypxfrd started
service ypbind restart
service ypxfrd restart
created a user #useradd nisuser
#passwd nisuser
---
cd /var/yp
#make
done.
now in client machine i run authconfig and selected nis,given domainname=www.pjk.com
server ip=192.168.1.2
restarted ypbind
now,in client i tried to login as user 'nisuser'
and getting error 'not found /home/nisuser',while /home/nisuser is present in nis server.and i
can login in server as 'nisuser'!.I already tried to change permissions ,using /rhome/nisuser
as default homedir for nisuser etc and not working.I already disabled iptables for testing.But I had successfully configured nis server in RHEL 3 using above steps.Is this to do something with selinux?Please geeks out there help me


Last edited by deepclutch; 09-19-2005 at 05:29 PM.
 
Old 09-19-2005, 05:57 PM   #2
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Please.....................................help me..........
 
Old 09-20-2005, 08:11 AM   #3
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
somebody please....help even RH have no howto for RHEL 4 nis .
 
Old 09-20-2005, 08:55 AM   #4
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hi deepclutch,
I think the problem was that you have not configured automount in your system to mount the users home directories on to the client machine from the server at the time of logging. We use the automount daemon to do this. configure it in /etc/auto.conf. after that restart it. If you are doing the server and client in a single machine you can't be successful in implementing NIS. if problem persists feel free to contact through this forum.
vimal...
 
Old 09-20-2005, 09:05 AM   #5
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Post

Hello Vimal,
I will try automount ,i got two machines,one running as server.before is it possible to mount users home dir in /home/nisuser?in our labs,
we mounted (using autofs) users in /rhome/nisuser as it is not possible to mount in default home dir .if possible,can you brief how do u configured NIS ,that will be a great help for ME.
-Prakash J K

Last edited by deepclutch; 09-20-2005 at 09:07 AM.
 
Old 09-20-2005, 10:26 AM   #6
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hi deepclutch,
Configuring NIS can be a bit nasty. one of the two questions i got wrong in RHCE exam was of NIS. it was a problem with the automounting function, i couldn't get it right. Automount is the real option to use in a client. You didn't use mounting onto the /home directory in the client because then user administration in the client won't be possible. other wise there won't be any problem mounting /home from server onto /home in client.
install ypserv which includes ypxfrd and yppasswd. check if the domainnames of the server and client are the same. start portmap service . edit Makefile if necessary....ie.. to configure the shares. issue the command /var/yp/ypinit -m . restart portmap and ypserv. now export your home directories via nfs . restart nfs. this completes the server configuration. in the client part install ypbind. start portmap. now configure the automount daemon in /etc/auto.master. execute the command "authconfig", specify your nisdomainname and server. restart portmap,autofs,and ypbind. if your server is up and running the client can detect the server over the network. now take a terminal and try to login using an account which is in the server from the client.
You must have a login. I think the main problem is that you have not configured your automounter correctly or not at all.
All the best for your RHCE.....
vimal......
 
Old 09-20-2005, 11:34 AM   #7
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Post

Thanks for your Help friend.I will post the results here.
 
Old 09-20-2005, 03:53 PM   #8
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Thumbs up

ALAS!SOLVED!Many thanks for insights of Vimal
i tried nfs in server exporting /home dir
#
Code:
vi /etc/exports
/home  *(rw,sync,no_root_squash)
service nfs restart
In client machine run authconfig
then configure autofs

Code:
vi /etc/auto.master
/home  /etc/auto.home --timeout=60
vi /etc/auto.home
*          --fstype=nfs4 192.168.1.2:/home/&
service autofs restart
tried login as user nisuser in client and...
$pwd
/home/nisuser
------------------------------
If i configure client ip with dhcp,the /etc/yp.conf file gets modified everytime starting client system.what2dowhat2dowhat2dowhat2dowhat2do Please................help
 
Old 09-21-2005, 04:03 AM   #9
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hi deepclutch,
Happy to know you got it working. NIS is an important service in a networked environment. To get it right is really important. But it could get wrong sometimes, when using automount. ie.. the configuration in /etc/auto.home must be correctly understood. now your problem is that of ip changing in /etc/yp.conf. I think the problem is that the ip of the server changes each time. i really dont understand your question. If you want a static ip for your server, you could specify a static ip in the dhcpd.conf file with respect to the MAC address of the server.If the case is the changing of client ip , then also you must set up a fixed ip for your client. ie... both server and client must have fixed ip..... if problem persists feel free to contact through this forum.
vimal...
 
Old 09-22-2005, 09:07 PM   #10
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Devuan Beowulf
Posts: 770

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Post

Thanks Vimal.
if u have configured clients using dhcp,the client sides /etc/yp.conf file gets modified everytime starting client system
That can be solved by editing /etc/dhcpd.conf and adding correct
option-nis-domain value and restarted services; )

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;

option nis-domain "www.pjk.com";
option domain-name "www.pjk.com";
option domain-name-servers 192.168.1.2;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.1.2 192.168.1.4;
default-lease-time 21600;
max-lease-time 43200;[/b]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Configuring NIS krishvij Linux - Newbie 1 03-12-2005 10:22 PM
how to join NIS server (SUN machine) to Linux NIS server? KoRiR Linux - Networking 3 04-28-2004 01:19 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 12:43 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Networking 1 03-31-2004 07:51 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Solaris / OpenSolaris 1 03-31-2004 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration