[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dynamically mount shares



On Sun, Dec 10, 2006 at 04:19:16PM +0100, Koen Vermeer wrote:
> Hi!
> 
> At home, I have a server with some files I'd like to access. The server
> contains both files in 'shared' directories (which means others can
> access them too) and in 'private' directories (for my eyes only). I'm
> looking for the best way to mount these directories.
> 
> First of all, I cannot use NFS (except maybe for NFSv4), because the
> user/group IDs on my laptop do not match those on my server. 

see the section regarding mapping in exports(5) .

> Instead, I
> think I'll use cifs.
> 
> The problem is how to setup the mounting in the best way. I cannot just
> mount the shares, as they might not be available all the time (I use the
> laptop elsewhere as well). Likewise, pam_mount doesn't work, because I
> might login at one place, suspend and then resume at home, in which case
> I wouldn't have access to the shares. So I guess I need some automounter
> for this to work.
> 
> Now, I'm having trouble understanding how to set this up. I need to use
> some credentials to mount the shares, which I can store in my home
> directory. The problem is that in that case, it only works for one
> account (mine) on the laptop. Or is there some way to have the
> automounter look at who's trying to access the directory, and use
> his/her credentials?

autofs should be able to do that. You can define custom mount options,
if you want.

-- Tzafrir



Reply to: