Re: autofs/smbfs - delayed mounting?

Michael H. Warfield (
Tue, 1 Dec 1998 23:20:01 -0500 (EST)

Nicholas J. Leon enscribed thusly:
> On Tue, 1 Dec 1998, Michael H. Warfield wrote:

> # The fix will kill off your reconnect daemon and commit other random
> # acts of terrorism. That is a very bad idea. What if there was another
> # mount in progress at that moment? Mounts with smbmount can take significant

> Yeah yeah.. I know! :) I tried to stress it was a "lets see what
> happens"...

Oh yeah... Been there... Done that... Got the teeshirt... :-)

> # Hmmm... Then I strongly suspect that you are running into the
> # same problem I saw when I got my smbmount script going. It works fine
> # with no hanging when done manually or when stdout and stderr are redirected
> # to files. When left alone, and automount attempts to redirect the output
> # to syslog, smbmount hangs exactly as you have described.
> # Try this...

> Yep. Sure enough that fixed it right up. Hmmmm. Redirecting them to
> /dev/null works, too.


Yeah... I know /dev/null works as well, it just meant losing any
error message that you might want...

Damn. I guess that means this just made it to the top of the list
of annoyances that I just HAVE to fix. I'll see if I can get it done before
taking off to the IETF conference in Orlando next week. Sigh...

> Btw, how do you accomplish samba mounting NOT using the mount hook?

Autofs has build in recognition for file system type "smb" and
calls smbmount to deal with it. It includes smbmount specific parameters
including user name and password. Here is an example (appropriately
sanitized) from the automount file on one of my workstations...

phil/winapps -fstype=smb,login={userid},passwd={share_pass} //phil/winapps
phil/public -fstype=smb,login={userid},passwd={share_pass} //phil/public

HOWEVER! Automount calls smbmount with the parameters and syntax
appropriate for the smbmount from the smbfs package. That smbmount program
no longer works with the smbfs in the 2.1.x kernels (x > 70). The smbmount
program from the samba package uses a different syntax. The story and
reason for that is long and Volker and I may put it together into an FAQ
one day. I hope to get a compatibility mode into the Samba smbmount
eventually that will work with autofs. Until that time arrives, I have
a shell script which replaces smbmount and calls either smbmount.smbfs or
smbmount.samba, depending on the booted Linux version, with appropriate
parameter translations. That script can be had off of my web server at

> G'day!
> -- n i c h o l a s j l e o n
> / elegance through simplicity /
> / good fortune through truth /
> / not all questions have answers /


 Michael H. Warfield    |  (770) 985-6132   |
  (The Mad Wizard)      |  (770) 925-8248   |
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at