[H-GEN] Auto mounting SMB shares

Michael Anthon mca at tams.com.au
Wed Jun 2 20:19:37 EDT 1999


I now have autofs mounting SMB shares.... sweeeeet !

Craig, thanks for the pointers, the entry in the file, however, is for amd,
which is a bit different.  I found a good mail archive for autofs and
managed to nut out what to do.  For others that may wish to do it, the
problem I had is with the newer (>2.1.70) kernels.  Versions above this
require a different smbmount program (the one from the samba package) and
the command line format is quite different.  The trick to fix this is to
rename the smbmount program to smbmount.samba and replace it with the
attached script which translates the old smbmount command format into the
new one (go here http://www.wittsend.com/mhw/smbmount.html for more info and
a more complete script that allows you to boot different version of the
kernel).

Then you just follow the usual (very poorly documented) autofs setup for
smbfs, which requires lines of the following format in the
/etc/auto.mount_point_name files

	bash> cat /etc/auto.pippin
	installers	-fstype=smbfs,login=myname,passwd=xxxx
://pippin/installers

There is a bug bunch of options available here, this is the bit that is
poorly documented, so, I reverted to reading stuff I don't fully comprehend
(the source 8^)

	static struct smb_mount_opt mount_opt_list[] = {
	  { "nocaps",    "-C", 0, 0 },
	  { "guest",     "-n", 0, 1 },
	  { "passwd",    "-P", 1, 1 },
	  { "srvname",   "-s", 1, 0 },
	  { "mysmbname", "-c", 1, 0 },
	  { "login",     "-U", 1, 0 },
	  { "uid",       "-u", 1, 0 },
	  { "gid",       "-g", 1, 0 },
	  { "filemod",   "-f", 1, 0 },
	  { "dirmod",    "-d", 1, 0 },
	  { "port",      "-p", 1, 0 },
	  { "maxxmit",   "-m", 1, 0 },
	  { NULL, NULL, 0, 0 }
	};


Cheers
Michael A.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smbmount
Type: application/octet-stream
Size: 1878 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/19990603/ac2eb093/attachment.obj>


More information about the General mailing list