Joshua Daniel Franklin
2002-Aug-14 06:14 UTC
[Samba] pam_mount: /etc/fstab or suid root smbmount?
I recently got to set up a Linux workstation in a mostly-Windows environment. I'm trying to use pam_mount from: http://bazar.conectiva.com.br/~epx/pam_mount/ 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 IOCC.COM
On Wed, 14 Aug 2002, Joshua Daniel Franklin wrote:> 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?You shouldn't make smbmount suid root. To allow user mounts it should be enough to make smbmnt suid root. I haven't used pam_mount so perhaps it needs something else. For the thousands of user case autofs maps can be useful. /Urban