LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-01-2009, 11:41 AM   #1
jlowry
LQ Newbie
 
Registered: Sep 2004
Location: Colorado and Oregon
Distribution: RedHat / Suse / Fedora
Posts: 20

Rep: Reputation: 0
automount of nfs home directories not working with configuration


Okay, here is the problem. I have gone through and setup a nis server. I am able to do a ypcat hosts and all this works just fine.
The problem I am having is the when I try to connect from a client system by logging in or doing a 'su - test' ( test is my test account), I get logged in but it fails to change the directory i.e 'su: warning: cannot change directory to /home/test: No such file or directory' error and then it logs in test and puts me in the directory that I was in.

I have setup a home directory for the users in /export. Each has there own directory i.e. /export/test
I have setup the exports file like this:
Code:
    # allow users on Home to read/write data on this machine
    /home           slick.edt.com(rw,sync)
    # /export	    slick.edt.com(rw,sync)
    #
    # allow users on any machine to read/write /home dirctory on this machine
    /home           *.edt.com(rw,sync)
The system shows my directories as being exports for nfs. The auto.master has :
Code:
/home /etc/auto.home
defined and the auto.home has :
Code:
# Home directory map for automounter
#
test	-rw,sync	slick:/export/&
jlowry	-rw,sync	slick:/export/&
jerryl	-rw,sync	slick:/export/&
*	-rw,sync	slick:/export/&
I would like this to map the export directory structure to show them as /home/test ..... for each user.

Am I incorrect in think this will map this way. Autofs starts and builds a home directory but it does not have any directories in it.

Also, when my client workstations reboot the authentication for nis changes from

domain 'name' server 'host'

to

domain 'name' broadcast

When this happens the ypbind never finds the ypserver. How can I either get this to stop changing the configuration or get ypbind to find the server using broadcast. ( at this point there are only three systems on the network. one server two clients and they can all ping each other based on the definition in the host file ) 'confusion abounds on this'


thanks
 
Old 12-01-2009, 06:41 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd recommend checking your setup against this good howto http://www.linuxhomenetworking.com/w...onfiguring_NIS and also run 'rpcinfo -p' on the server to see if all the reqd processes are running.
Are the relevant ports open on clients and server?
 
Old 12-02-2009, 10:42 AM   #3
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by jlowry View Post
Okay, here is the problem. I have gone through and setup a nis server. I am able to do a ypcat hosts and all this works just fine.
The problem I am having is the when I try to connect from a client system by logging in or doing a 'su - test' ( test is my test account), I get logged in but it fails to change the directory i.e 'su: warning: cannot change directory to /home/test: No such file or directory' error and then it logs in test and puts me in the directory that I was in.

I have setup a home directory for the users in /export. Each has there own directory i.e. /export/test
I have setup the exports file like this:
Code:
    # allow users on Home to read/write data on this machine
    /home           slick.edt.com(rw,sync)
    # /export	    slick.edt.com(rw,sync)
    #
    # allow users on any machine to read/write /home dirctory on this machine
    /home           *.edt.com(rw,sync)
The system shows my directories as being exports for nfs. The auto.master has :
Code:
/home /etc/auto.home
defined and the auto.home has :
Code:
# Home directory map for automounter
#
test	-rw,sync	slick:/export/&
jlowry	-rw,sync	slick:/export/&
jerryl	-rw,sync	slick:/export/&
*	-rw,sync	slick:/export/&
I would like this to map the export directory structure to show them as /home/test ..... for each user.

Am I incorrect in think this will map this way. Autofs starts and builds a home directory but it does not have any directories in it.

Also, when my client workstations reboot the authentication for nis changes from

domain 'name' server 'host'

to

domain 'name' broadcast

When this happens the ypbind never finds the ypserver. How can I either get this to stop changing the configuration or get ypbind to find the server using broadcast. ( at this point there are only three systems on the network. one server two clients and they can all ping each other based on the definition in the host file ) 'confusion abounds on this'


thanks
Please first check that your nfs exports do work manually.
* -rw,sync slick:/export/&
This is a correct line.
If I am correct the others will not be correct.
If you do /home/myuser then it will mount slick:/export/myuser

About NIS, please check if you configure your directives correctly.
What distro do you use?
 
Old 12-02-2009, 02:50 PM   #4
jlowry
LQ Newbie
 
Registered: Sep 2004
Location: Colorado and Oregon
Distribution: RedHat / Suse / Fedora
Posts: 20

Original Poster
Rep: Reputation: 0
closer but still not there

About NIS, please check if you configure your directives correctly.
I have setup the nsswitch directives in a number of ways. It has not made any difference that I can tell.

What distro do you use? Centos 5.4 x86_64

I have gotten a little closer. My directory homes and the file system is now being shown as mapped and mounted on the client as /home.
Small little bug that one of my co-workers found. If the auto.home file permissions are set to execute the automounter tries to execute the file instead of parsing it. Wonder how many people miss this.

The problem now is that when I try to log in from the client I am getting an error that looks to be from the local client:
Quote:
User not known to the underlying authentication module
I have installed pamtester on both the client and server. When I run it on the server with the login user authenticate parameters it will correctly authenticate the login and sessions...et al. But if I run it on the client it fails to authenticate.

Will pamtester work over the network to the server or does it only work on the system it is running on?

Just for my sanity here is my nsswitch:
Code:
passwd:     files nis
shadow:     files
group:      files nis

#hosts:     db files nisplus nis dns
hosts:      files dns nis

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     

bootparams:  nisplus [NOTFOUND=return] files

ethers:     files nis
netmasks:   files nis
networks:   files nis
protocols:  files nis
rpc:        files nis
services:   files nis

netgroup:   files nis

publickey:  files nisplus

automount:  files
aliases:    files nis nisplus
thanks
 
Old 12-02-2009, 10:19 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You should read through that link I gave you and check everything. As an example
Quote:
#/etc/nsswitch.conf
passwd: files nis
shadow: files nis
group: files nis
note the shadow file must have a nis option; yours doesn't(!)
 
Old 12-03-2009, 09:58 PM   #6
jlowry
LQ Newbie
 
Registered: Sep 2004
Location: Colorado and Oregon
Distribution: RedHat / Suse / Fedora
Posts: 20

Original Poster
Rep: Reputation: 0
Question nis client broadcast not finding server

Well, I got this to mostly work...between nfs and nis configuration. I had walked through both of these many times. Finally reinstalled one client and walked through the nfs and nis config. Not exactly sure what the misconfiguration was but its mostly working.

The problem that still remains:

yp.conf contains
Code:
domain domain.name broadcast
after a reboot. The problem is that the client never finds the nis server. Which leads to another problem of the nfs mount never taking place. I have to change the yp.conf to read:

Code:
domain domain.name server name
Then I restart nis, nfs autofs and then I can mount the driver from the server.


What is changing the yp.conf back to broadcast and how to fix it or why is the client not seeing the server. I can ping the server all day, ypcat works for everything once I change the config file and restart nis.

I have seen many threads on this but none of them have an answer and if the problem got fixed no one updates the thread.

Any thoughts?
 
  


Reply



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
automount home directories with information from Active Directory (or NIS) alex r Linux - Software 5 08-30-2006 10:05 AM
Automount home directories??? BeauSanders Linux - Networking 2 09-15-2005 04:16 PM
automount home directories alex r Linux - Software 2 02-24-2005 10:02 PM
automount Solaris home directories onto RedHat ghouliajoolia Linux - General 3 09-07-2004 06:20 AM
getting home directories to automount with NIS schurt Linux - Networking 3 04-23-2004 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:51 PM.

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