[Gllug] Mounting SMB shares on X Login

Pete Ryland pdr at pdr.cx
Thu Dec 13 22:39:40 UTC 2001


On Thu, Dec 13, 2001 at 06:47:24PM -0000, Daniel Fairs wrote:
> > The "secure" way of doing it, IIRR is to enter the info into fstab,
> > specifying the smbfs filesystem, and mount point, with the user option
> > to allow non-root users to mount it. ISTR that smbmount would read
> > username and password from environment variables - you could stick these
> > somewhere not world readable. It's not great, but it can be made to
> > work.
> >
> 
> OK, I'm getting there... I've got a directory /mnt/smb onto which I want to
> mount the SMB 'homes' share from my NT server. I've written a little script
> which chown's /mnt/smb to the user who's logging in (otherwise smbmount
> doesn't work) and I have the entry in /etc/fstab. Now, the user can manually
> mount the share, using the mount command, and it asks for their password.

Instead of changing the permissions like this which is sorta bad, you should
add the "user" option into the fstab file.

Dunno about the rest. :)

hth,
Pete

> You mention taking the password from the environment - how do you get
> pam_smb_auth to store the password in the environment? If I could get at the
> password, then I could write an expect script to supply it to smbmount.
> 
> The alternative would be to get root to mount /mnt/smb at boot time, again
> using expect to supply the password - but then the logged-in user can't
> write to it.
> 
> Any further thoughts?
> 
> Thanks for your help so far...
> 
> Cheers,
> Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011213/864e0930/attachment.pgp>


More information about the GLLUG mailing list