LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-22-2009, 03:47 PM   #1
Savita Eli
LQ Newbie
 
Registered: Jul 2009
Location: St.Louis,MO
Posts: 13

Rep: Reputation: 0
Need help:Configuring autofs to automount the home directories of NIS users.


Hi,
I have a scenario:
–NIS server 172.168.1.132 NFS-exports /rhome/station100 to your system and suppose have 3 users (nisx) nis1,nis2,nis3,where x is ur system id.
-- nis1's home directory is 172.168.1.132:/rhome/station100/nis1
-- nis2's home directory is 172.168.1.132:/rhome/station100/nis2
-- nis3's home directory is 172.168.1.132:/rhome/station100/nis3
– nis1's home directory should be automounted locally beneath /rhome as /rhome/nis1
– home directories must be writable by their users
– While you are able to log in as any of the users nis1 through nis3, the only home
directory that is accessible from your system is nisx, where x is ur system id.

Example: station100 would configure the automounter such that nis1’s home directory
/rhome/nis1 gets mounted automatically upon login. The NFS share would be
172.168.1.132:/rhome/station100/nis1

I have been trying this frm past 2 days. Not able to solve.
My auto.home entries:
* 172.168.1.132 /rhome/&
* 172.168.1.132 /rhome/station100/&

My auto.mount entries:
/rhome /etc/auto.home

I have been trying all the ways, but no clue whats going wrong.
Plz help me asap.

Thanx,
Savita.
 
Old 07-22-2009, 04:07 PM   #2
sjevans1
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Rep: Reputation: 0
The syntax for automount maps are usually:

<trigger> <server>:/my/path/to/nfs/share -<option1>,<option2>

You can use wildcards, but can't remember whether if it matches and fails to mount, whether it continues or not.

I assume the first entry is to resolve the /home/station100 mount. If so and the automounter doesn't continue after a match, something like this should work..

station1 172.168.1.132:/rhome/&
* 172.168.1.132:/rhome/station100/&


So the first entry will catch /home/station1 and the wildcard everything else.

The mounts are generally rw by default, but if you want to specify them then you do this in the auto.home|auto_home file as:

/home /etc/auto.home -rw

And if you want soft mounts:

/home /etc/auto.home -rw,soft


Hopefully I've told you something that will work!

Simon

Last edited by sjevans1; 07-22-2009 at 04:08 PM.
 
Old 07-23-2009, 12:59 PM   #3
Savita Eli
LQ Newbie
 
Registered: Jul 2009
Location: St.Louis,MO
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,

The problems was partially resolved.
I am facing 2 problems with this.
Details:
-----------

Problem 1> Even though,nis1's home dir is mounted under /rhome/nis1, Could not able to change to home dir upon login on client(172.168.1.129) and nis user is placed in '/' of client.

[root@aca80181 ~]# ssh -l nis1 172.168.1.129
nis1@172.168.1.129's password:
Last login: Thu Jul 23 11:42:09 2009 from aca80181.ipt.aol.com
Could not chdir to home directory /rhome/station100/nis1: No such file or directory
-bash-3.2$ pwd
/

Problem 2> Though only one user nis1 tried to login, all the users are getting their home dirs in /rhome/

[root@aca80181 ~]# ls /rhome/
nis1 nis2 nis3

My machine configurations:
---------------------------------
NIS server: 172.168.1.132
Shares: /rhome/station100/

NIS Client: 172.168.1.129
Needs to mount nis user dir under /rhome/nis which on server is under /rhome/station100/nis

My auto.master entries:
/rhome/ /etc/auto.home -rw

My auto.home entries:
station100 172.168.1.132:/rhome/&
* 172.168.1.132:/rhome/station100/&

Last edited by Savita Eli; 07-23-2009 at 01:03 PM.
 
Old 08-13-2009, 06:26 PM   #4
dudud
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Did you find the answer to this problem?

I am trying for 3 days to solve this problem but with no success I have search the web and amazingly didn’t find the answer to this one
If you solved it please let me know I need it urgently
Thank you
 
Old 08-26-2009, 11:26 PM   #5
grep65535
LQ Newbie
 
Registered: Jul 2006
Location: Seattle, WA
Distribution: Fedora, RHEL, CentOS
Posts: 29

Rep: Reputation: 18
Quote:
Originally Posted by Savita Eli View Post
Hi,

– While you are able to log in as any of the users nis1 through nis3, the only home directory that is accessible from your system is nisx, where x is ur system id.

Example: station100 would configure the automounter such that nis1’s home directory /rhome/nis1 gets mounted automatically upon login. The NFS share would be
172.168.1.132:/rhome/station100/nis1
Hopefully you're not taking the top part of this as a *requirement*. Because the way I read it, it seems more like someone is just letting you know some parameters as opposed to being something that you need to accomplish.

it's either

auto.home:
* 172...:/rhome/station100/&

or

auto.direct (by declaring "/-" in the auto.master):
/rhome 172...:/rhome/station100/&



Other than that I'm not sure why your system isn't working.
 
  


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
autofs nfs mounting home directories question extendedping Linux - Networking 3 01-30-2008 03:02 PM
automount home directories with information from Active Directory (or NIS) alex r Linux - Software 5 08-30-2006 10:05 AM
NIS, NFS, autofs and /home folder question ramram29 Linux - Networking 2 08-25-2006 08:26 PM
NIS and autofs with /home Rekna Linux - Networking 1 06-20-2004 11:34 PM
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 01:48 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