Re: [SLUG] autofs + samba

From: Eben King (eben01@verizon.net)
Date: Sun May 16 2010 - 17:53:19 EDT


On Sun, 16 May 2010, Eben King wrote:

> I'm trying to set up autofs on my laptop, to automatically mount/dismount my
> desktop's Samba/SMB shares. I'm following this guide:
> http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs
> though from what I can tell the same script and similar instructions are in
> many places on the net.

...

> OK, so credfile needs to end with the servername (in my case, "pc") for that
> to match. But when the script runs, $key gets server/share (in my case
> "pc/mp3") which makes credfile "/etc/auto.smb.pc/mp3" which is an illegal
> filename.

Figured it out. And typo (mine). I defined $server:

server="${key%/*}"

changed the definition of $credfile:

credfile="/etc/auto.cifs.$server"

and changed the awk invocation so its variable "key" points at $server:

... | awk -v key="$server" ...

But the main holdup was several shares that are no longer valid (in my
defense, they used to work); in particular dvd[12] and print, so I removed
them. I guess if I need to use a DVD or print remotely, I'll have to figure
out how it works now. Once they were removed, autofs worked. Maybe the
error threw it into a tizzy.

-- 
-eben    QebWenE01R@vTerYizUonI.nOetP    royalty.mine.nu:81
> A: It's annoying as hell
> Q: Why do most people hate top-posting? -- Lots42 The Library Avenger
        http://www.fscked.co.uk/writing/top-posting-cuss.html
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:26:37 EDT