smbmount

Michael H. Warfield mhw at wittsend.com
Thu Nov 5 18:42:04 GMT 1998


System Administrator enscribed thusly:

> can someone tell me the different between the smbmount included with samba
> (1.9.18p10 compiling for 2.1.126)
> and the smbmount included with smbfs.

	That is going to be the subject of an FAQ as soon as I finish
digging out from under...

> Using the smbfs one I can mount my NT server under a mount point fine.

> Using the samba one I just get a smb: \> prompt and typing commands like
> ls or help in the prompt doesn't work. Using the samba smbclient gives
> the prompt to, but at least commands like ls and help work. I still can't
> find an option to mount the share under a directory.

	The syntax for the smbmount program from smbfs does NOT work with
the smbmount program from samba.  There are important, critical differences,
not the least of which is moving the mount point under a "mount" command
burried under a -c option.

	An example of the changes:

Old:	smbmount //phil/public /phil/public -n -U dude -P dudesword
New:	smbmount //phil/public dudesword -U dude -N -c "mount /phil/public"

	Note that a positional parameter (the mount point) is now subsumed
into a string which is part of an option parameter.  One option parameter
(the password) has now become a positional parameter.

	If you want to mount the file system that -c mount command is
not really optional.

	It's an ugly problem and on my list of things to work on, along with
fixing some timing windows and making the Windows95 bug workaround dynamic.
I'm trying to come up with some way to support and automatically switch
between both the old and new syntax.  Opinions and suggestions are more
than very welcome!   IMHO, the older syntax is preferable.  The mount
command string makes driving this thing out of a script or another program
a royal pain and ugly as all get out...  But that's just my opinion.

	For those who are interested in why the changes...  Volker switched
over to samba as the source for smbmount for several reasons.  There were
several problems with the smbmount from smbfs when it came to automatic
reconnection and, I believe, some protocol negotiations.  Some of the login
and protocol negotiation stuff just did NOT belong in the kernel and they
decided it should be in a user space daemon.  The smbmount from samba
works with the newer smbfs and forks off a daemon to deal with the reconnects
and login issues.  Unfortunately Volker got stuck with some higher priority
educational issues (gee Tridge and Volker both...  Must be something in the
water) an the command line ended up adopting the samba syntax for lack of time.
The kernel level interface between the old and the new smbfs versions is
sufficiently different (required by the new daemon) that the two versions
are incompatible.  Volker may chime in if I've gotten any of this too far
off base...  :-)

	I'm just Johnny-come-lately on the scene and trying to deal with some
of the burning issues (like the syntax confusion) and answer questions while
maybe getting some tweeks and adjustments in (like RedHat 5.x compilation and
autoconfiguration in the 2.0 Samba branch).

	The smbmount package in the Samba 2.0 branch does compile under RedHat
5.x and other Glibc distributions.  You can get that from the Samba ftp
sites or check it out from the CVS repository.  Don't expect any changes
back in the 1.9 branch.

	Also...  Concerning Revs...

	There is a critical dependency on revisions.  The smbfs version of
smbmount can only be used with kernels 2.1.70 and earlier, including all
2.0 kernels.  The samba version of smbmount can only be used with the
kernel versions 2.1.70 and later.

	If you have to dual boot between 2.0 kernels and later development
kernels, I have a shell script which replaces smbmount and calls smbmount.smbfs
or smbmount.samba as appropriate with appropriate parameter translations.
Anyone attempting to use autofs will need this.  You can get it here:

	http://www.wittsend.com/mhw/smbmount.html

	I haven't updated the page in a month or so and someone has sent
me some patches to integrate in, so give it a day or two while I update
things...

> [root at cygnus docs]# smbmount //Zerocool/C$ <password> -U Administrator
> Added interface ip=<my client ip> bcast=<my broadcast addy> nmask=255.255.255.192
> Server time is Thu Nov  5 12:47:48 1998
> Timezone is UTC-5.0
> Domain=[WORKGROUP] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
> security=user
> smb: \> ls
> ls: command not found
> smb: \> help
> help: command not found

> I tried \\'s for the service name too. That generated an error.
> Any help is appreciated.

> -Tony
> -._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.
> Anthony J. Biacco                           Network Administrator/Engineer
> admin at intergrafix.net                        Intergrafix Internet Services
> 
>           "The best way to predict the future, is to invent it."
> http://cygnus.ncohafmuta.com                    http://www.intergrafix.net
> -._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.

	Regards,
	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw at WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!


More information about the samba-technical mailing list