[Samba] pam_mount: /etc/fstab or suid root smbmount?

Joshua Daniel Franklin joshua at iocc.com
Wed Aug 14 06:14:01 GMT 2002

I recently got to set up a Linux workstation in a mostly-Windows
environment. I'm trying to use pam_mount from:


to automatically mount smb shares from a Windows 2000 server at login.
(pam_mount is a pam module that grabs the passwd you use for login, xdm, ssh,
or any other pam module and uses it with smbmount to automatically mount shares
when you log in.)

The problem is, mount is suid root but if you try to mount something not in
/etc/fstab it says "mount: only root can do that". So one solution is to put
a bunch of entries in /etc/fstab like:
none                    /home/username/data       smb     user            0 0
none                    /home/username/public     smb     user            0 0

Now, the alternative is to make smbmount suid root. This might be a 
security issue, but less messing with /etc/fstab (not much of an issue here,
but imagine if you had several thousand users in a win2k domain).
Any thoughts on which would be better?

Please CC me in replies since I'm not on the list, though I will be following
the web archives.

Joshua Daniel Franklin
Network Administrator

More information about the samba mailing list