[clue-tech] Sharing samba with libpam-mount?

Adrian F. Nagle, IV anagle at naglenet.org
Sun Feb 1 14:24:48 MST 2009




> From: David L. Anselmi <anselmi at anselmi.us>

> > The config file apparently changed to an xml format file. I added the
> > following to the bottom of /etc/security/pam_mount.conf.xml:
> > 
> >    
> >             user="*" | pgrp="*" | sgrp="winusers"
> >             fstype="smbfs"
> >             server="//jerome/srvshare"
> >             path="nagle_ext1"
> >             mountpoint="/media/nagle_ext1"
> >     />
> > 
> >    
> >             users="*"
> >             fstype="smbfs"
> >             server="//jerome/srvshare"
> >             path="homes"
> >             mountpoint="/home/%(USER)/remote"
> >             options="dmask=0711"
> >     />
> 
> Here I just used this:
> 
>     
>             users="*"
>             fstype="smbfs"
>             server="st-peter"
>             path="install"
>             mountpoint="/mnt"
>     />
> 
> server is the name of the server, only.  Use jerome, and make sure that "ping 
> jerome" works.
> 
> path is the share name on the server.  It will match what your smb.conf has in 
> brackets (e.g., in my case [install]).  In your case I think this is srvshare.
> 
> In my case I got all the files I expected under /mnt.  The permissions match 
> what's on the server but the user and group are both me.  Probably there are 
> options to change that (but you'd want the uids/gids to match between the server 
> and all clients).
> 
> If you don't get useful messages when logging in to a terminal you might also 
> set the line in pam_mount.conf.xml to 1.
> 

So I changed my mount argument to be the following:
    <volume
            user="*"
            fstype="smbfs"
            server="jerome"
            path="srvshare"
            mountpoint="/media/network"
    />

Now I do get a listing at /media/network.  However, I get a strange recursive link for the /media/network/nagle_ext1 directory.  

In /media, I originally created a nagle_ext1 directory to mount to but now when logging in I get:
lrwxrwxrwx 1 addy anagle   17 2008-01-07 19:12 nagle_ext1 -> /media/nagle_ext1

In /media/network, I get something similar.  As you may recall, nagle_ext1 is the external drive I have mounted which has all the files I'm interested in having access to.
drwxr-xr-x 6 addy anagle  0 2008-11-28 10:11 homes
drwxr-xr-x 2 addy anagle  0 2006-05-13 08:45 lost+found
lrwxrwxrwx 1 addy anagle 17 2008-01-07 19:12 nagle_ext1 -> /media/nagle_ext1

I'm not sure how I got myself into this situation.

If I logon to server jerome, I can find /media/nagle_ext1 (linked to in samba) easy enough and it looks normal.

Adrian
-- 
Adrian Nagle ~ anagle at naglenet.org



More information about the clue-tech mailing list