[Lias] pam_mount for smb homedir mounting

David Lloyd lloy0076 at adam.com.au
Thu Sep 11 07:50:02 UTC 2003


Craig,

> I ran into this the other day, and remembered that a number of people
> on [lias] were looking for ways to mount SMB homedirectories in a
> sensible way. This looks like the way to go: mount them when the user
> logs in, using the credentials they give at login.
> 
> http://www.flyn.org/projects/pam_mount/

Yes, that is a reasonably good module, with a few caveats:

 1) The users must exist such that a call to the system call "getpwent"
    actually returns something

I am working on addressing this problem.

> I haven't tried it yet, however it definitely looks interesting. I
> don't need SMB homedirs, but do have a couple of other uses for it.

I have also run into a bug on Debian GNU/Linux with 2.4.18, 2.4.20 and
2.6.0-test2 whereby pam_mount can't unmount the mounted directories. I
have diagnosed the problem as this:

 1. pam_mount mounts the directory as root
 2. it then executes a setuid to become the user attempting to mount
 3. it then attempts to execute a setuid to root (to unmount)
    - but you can't do this

Indeed, even smbumount setuid root can't unmount the mounts because a
setuid smbumuont can't unmount a share that's been mounted by root
itself.

I am also working on addressing this problem. Essentially I am going to
attempt to get everything mounting as the user without the need for a
setuid smbumount or smbmount at all.


DSL

-- 
There are no other guests, just you and me...
 I'm in love with, surely you know that?




More information about the lias mailing list