Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-19-2005, 05:59 PM
|
#1
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Rep:
|
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 06:29 PM.
|
|
|
09-19-2005, 06:57 PM
|
#2
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
Please.....................................help me..........
|
|
|
09-20-2005, 09:11 AM
|
#3
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
somebody please....help even RH have no howto for RHEL 4 nis .
|
|
|
09-20-2005, 09:55 AM
|
#4
|
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260
Rep:
|
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...
|
|
|
09-20-2005, 10:05 AM
|
#5
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
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 10:07 AM.
|
|
|
09-20-2005, 11:26 AM
|
#6
|
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260
Rep:
|
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......
|
|
|
09-20-2005, 12:34 PM
|
#7
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
Thanks for your Help friend.I will post the results here.
|
|
|
09-20-2005, 04:53 PM
|
#8
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
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
|
|
|
09-21-2005, 05:03 AM
|
#9
|
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260
Rep:
|
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...
|
|
|
09-22-2005, 10:07 PM
|
#10
|
Member
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Original Poster
Rep:
|
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]
|
|
|
All times are GMT -5. The time now is 01:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|