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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
linux boot fsck problem 3 61
Issue with SFTP on non-root account using Guacamole  / GUAC 2 65
Centos 6 User Can't Assign Password 2 25
Linux VM 6 49
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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 how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

895 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

17 Experts available now in Live!

Get 1:1 Help Now