[clue] Automatic /smb fs, just like /net
David L. Willson
DLWillson at TheGeek.NU
Tue Jul 24 10:13:41 MDT 2012
Credit where credit's due. I found it here:
http://wiki.centos.org/TipsAndTricks/WindowsShares
--
David L. Willson
Trainer, Engineer, Enthusiast
RHCE Network+ A+ Linux+ LPIC-1 Ubuntu
Mobile 720-333-LANS(5267)
This is a good time for a r3VOLution.
----- Original Message -----
> The autofs configuration below allows any user to create a
> .secret.txt in $HOME and then depend on the autofs daemon to perform
> mounts in the /smb tree using their credentials, like this:
> ls /smb/server/share/dir1/.../dirN
> $ cat /etc/auto.master
> <snip>
> /smb /etc/auto.smb.top
> <snip>
> $ cat /etc/auto.smb.top
> * -fstype=autofs,-Dhost=& file:/etc/auto.smb.sub
> $ cat /etc/auto.smb.sub
> * -fstype=cifs,credentials=${HOME}/.secret.txt,uid=${UID},gid=${EUID}
> ://${host}/&
> Yes, it's got problems and implications:
> - root can read that .secret.txt file and get direct access to the
> user's CIFS credentials.
> - a second user on the system trying to access an already-mounted
> share will be blocked by the previous auto-mount.
> ... but it's pretty sweet for 80+% of use-cases.
> --
> David L. Willson
> Trainer, Engineer, Enthusiast
> RHCE Network+ A+ Linux+ LPIC-1 Ubuntu
> Mobile 720-333-LANS(5267)
> This is a good time for a r3VOLution.
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20120724/714f7fd9/attachment.html
More information about the clue
mailing list