Solved

How do I auto mount a windows share based on the user logging into the Linux Workstation

Posted on 2007-11-15
5
1,493 Views
Last Modified: 2013-12-16
I have a Fedora Core workstation successfully authenticated it against the windows domain and can login as a windows domain user, mount cifs shares using AD users I just have one last small mission to accomplish.

How do I dynamically mount shares as the user logs in - fstab is all good for mounting a specific share with a specific username but that doesnt fit the bill here (as it wouldnt in most large networks) Basically I need to give each user thier home dir as they login into the Linux box. I'm thinking something like:

\\windows_server\home\%U \\localhost\DOMAIN\%U\Documents\

But with the correct syntax if it is possible

Thanks in advance
0
Comment
Question by:kiwi_nz
5 Comments
 
LVL 13

Accepted Solution

by:
WizRd-Linux earned 43 total points
ID: 20295516
If all the home directories are in the same directory on the windows server you can install the nfs tools and export the directory.  You could then use autofs to automatically mount the directory to be their home directory.

This way they will have the home directory /home/<domain>/<username> which is automated from the server.

This may not be exactly what you WANT to do, but it is definately a viable solution that could assist you.
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 41 total points
ID: 20296498
Hi,

If you choose to use NFS, then please see the links below on how to install and configure NFS on Windows:

http://support.microsoft.com/kb/324055
http://www.microsoft.com/technet/community/events/windows2003srv/tnt1-118.mspx

On the other hand, you may use samba. Please see:

http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/install.html#id319843

Now, depending on the login shell of the users (bash, etc), you may use to add a similar command to /etc/profile file:

smbclient  //yourhostname/aservice

Here you need to substiute your server name and share name based on the user name.
0
 

Assisted Solution

by:madscientist159
madscientist159 earned 41 total points
ID: 20393010
What you are looking to do is discussed here under "Mounting shares automatically using libpam-mount"
http://www.hants.lug.org.uk/cgi-bin/wiki.pl?LinuxHints/SambaAuth
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21197927
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now