LinuxQuestions.org
Help answer threads with 0 replies.
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 06-28-2012, 06:08 AM   #1
bruno.vila
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
mount home dirs with autofs


I have configured the home dirs from the users in my network like this:

/home/company/managers/user1
/home/company/managers/user2
/home/company/sales/user3

......




How can I export theese home dirs by NFS and mount them in the clients with autofs?
 
Old 06-28-2012, 08:02 AM   #2
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
Quote:
Originally Posted by bruno.vila View Post
I have configured the home dirs from the users in my network like this:

/home/company/managers/user1
/home/company/managers/user2
/home/company/sales/user3

......




How can I export theese home dirs by NFS and mount them in the clients with autofs?
Well first you have to export these directories to network on the server side. Open the /etc/exports file and place enteries like
Code:
/home/company/managers/user1	<IPaddress or network>(r[w/o],no_root_squash)
/home/company/managers/user2	<IPaddress or network>(r[w/o],no_root_squash)
/home/company/sales/user3	<IPaddress or network>(r[w/o],no_root_squash)
Then use /usr/sbin/exportfs -a command to export the shares.

Now on the client you need to automount the nfs shares. Place an entry like following in your /etc/auto.misc file
Code:
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user1
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user2
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/sales/user3
Hope this helps.
 
Old 06-28-2012, 08:18 AM   #3
bruno.vila
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Now on the client you need to automount the nfs shares. Place an entry like following in your /etc/auto.misc file
Code:
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user1
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user2
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/sales/user3

But, I have so many users to type their username in /etc/exports and /etc/auto.misc

I need a solution that works with any user.
 
Old 06-28-2012, 01:44 PM   #4
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
Quote:
Originally Posted by bruno.vila View Post
Now on the client you need to automount the nfs shares. Place an entry like following in your /etc/auto.misc file
Code:
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user1
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/managers/user2
nfs             -fstype=nfs,intr <NFS server IP>:/home/company/sales/user3

But, I have so many users to type their username in /etc/exports and /etc/auto.misc

I need a solution that works with any user.
Why don't you export your /home directory it will export all the user's homes.
 
  


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
[SOLVED] NFS + autofs /home mount stubbornly mounting as "nobody" ellakano Linux - Server 12 02-12-2013 04:34 PM
[SOLVED] Apple gcc: Insert include dirs between -I dirs and -isysroot dirs f.barker Programming 1 11-11-2011 10:19 AM
Fully asynchronous NFS-like protocol to mount home dirs caveden Linux - Networking 3 10-04-2009 04:59 PM
Autofs fails to mount home directory Neruocomp Solaris / OpenSolaris 0 05-20-2009 01:58 PM
Backing Up Home Dirs before upgrade Thin Mandriva 6 02-01-2005 11:44 PM

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

All times are GMT -5. The time now is 02:28 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