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,499 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 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