[clue] Automatic /smb fs, just like /net

Chris Fedde chris at fedde.us
Tue Jul 24 10:55:34 MDT 2012


My favorite line from the amd manual page is: "A  weird  imagination
is most useful to gain full advantage of all the features."

On Tue, Jul 24, 2012 at 10:12 AM, David L. Willson <DLWillson at thegeek.nu> wrote:
> 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


More information about the clue mailing list