[CentOS] Automatic User Based Mounts

John R Pierce pierce at hogranch.com
Mon Nov 12 19:39:40 UTC 2007


Scott Moseman wrote:
> Let's say I have a Samba server for my file serving needs.  Would
> there be any way to configure CentOS to automatically mount a few
> specified partitions as the user logging in?  Something of the nature
> of /mnt/home, /mnt/pictures, /mnt/music and so forth.  They need to be
> mounted as the current user, and I prefer not to customize shell based
> login scripts.  Can this be done through fstab somehow?  Or some other
> method?  I can make, and currently utilize, SMB share links on my
> desktop for accessing them.  However, when applications want to open
> or save directly to the file system, I'm unable to reach the network
> shares.  In the grand scheme of things, this makes having network
> shares pretty much useless.  There must be a better way?
>   


Samba implements SMB, which is Windows method of network file sharing.  
unix to unix works much better with NFS.    Assuming this Samba server 
is in fact unix based, you can run both NFS and Samba concurrently, use 
NFS for the unix/linux clients, and SMB for Windows clients.

re: your login scheme...    Centos is a multiuser system... what if two 
users are logged in concurrently, who's /mnt/pictures would you want?

NFS systems often put a users entire home directory on the network 
server, and mount it at login as /home/servername/username





More information about the CentOS mailing list