[clue-tech] Sharing samba with libpam-mount?
Dennis J Perkins
dennisjperkins at comcast.net
Sat Jan 31 11:14:10 MST 2009
On Sat, 2009-01-31 at 09:28 -0800, Adrian F. Nagle, IV wrote:
> > From: Dennis J Perkins <dennisjperkins at comcast.net>
>
> > The pam_unix messages are normal. The first means that your request for
> > a session was authenticated and approved. I'm not sure about the other,
> > but I looked at my system and I see that these pam_unix messages
> > sometimes come in pairs.
> >
> > I missed the start of this thread. What is the problem?
> >
> > @include common-pammount loads a set of shared pam directives into the
> > directive files you mentioned: login, su and kdm. I'm guessing that you
> > want to use Samba to automatically connect and disconnect when you log
> > in and out? That makes sense for login and kdm, but su?
> >
>
> Yes, my goal was to automatically mount samba volumes, without having to mess with passwords. I was just following directions I found online, and I see now loading pam in su is not necessary.
>
> I'm trying to mount the sharename "srvshare" (listed in my smb.conf file) on my jerome server at the local mount point /media/srvshare.
>
> Looking at df and listing the contents of /media/srvshare it doesn not look like pam_mount is mounting what I want. I'm trying to figure out what I missed or have setup incorrectly. My questions are trying to figure out how to debug this.
>
> I can connect to srvshare via Konqueror (smb://jerome/srvshare/nagle_ext1).
>
> Adrian
Does your pam_mount in the auth section look like this? use_first_pass
tells it to use the password that was used earlier by pam_unix;
otherwise, I think you need to enter the password more than once.
auth optional /lib/security/pam_mount.so use_first_pass
It should like this in the session section:
session optional /lib/security/pam_mount.so
See if you have file /etc/security/pam_mount.conf. That file seems to be
necessary.
If it has this line:
smbmount /bin/mount -t smbfs
try changing smbfs to cifs. You need to have /sbin/mount.cifs for this
to work.
You also need to tell pam_mount to mount something. I found this
example, but I don't use Samba, so I cannot tell you how to use it. I
don't know if this belongs in a Samba file or if it should be in
pam_mount.conf.
volume * smb <server> & /home/& uid=& - -
Another site shows what I think is the setup for this line:
volume * cifs servername sharename ~/mount-point dmask=0751 - -
I have a PAM book packed away somewhere that might provide some help on
pam_mount.
More information about the clue-tech
mailing list