Red Hat Bugzilla – Bug 1710
samba-2.0.x vs autofs mounting of samba shares
Last modified: 2008-05-01 11:37:49 EDT
There wasnt a category for autofs so I put it under samba as
both packages are involved (smbfs is tangentially involved
The current version of autofs when attempting to automount
smb shares uses the *old* smbfs format when calling smbmount
which is incompatible with the newer format from samba.
This results in the inability to use autofs to mount smb
Its a tough call as to whose fault this is, but none the
less the users are the ones stuck with the problem.
The quick and dirty fix is to use a script called
smbmount.sh to transparently "fix" the call to smbmount on
the fly. I guess this could be done by tweaking the autofs
package to call a modified smbmount.sh which in turn calls
The real solution is to get the autofs folks to fix it to
work properly with samba.
John -- I have hacked on autofs so that it now takes the smbmnt style
options to mount SAMBA file systems. However, I haven't tested it
very much. When the new rawhide tree becomes available this friday,
or when a new beta image is available, please have a look at it
(autofs-3.1.3). Please reopen the bug if it is still broken.
I updated both my autofs (to 3.1.3-1) and Samaba 2.0.3 to the latest
from rawhide but I unfortunately so no change in behavior. I still
had to use my old smbmount.sh to get it to work.
Am I missing something regarding the update??
We were not able to finish integrating smb mounts into autofs in time
for the 6.0 release. Full integration is a target for our next
Now with the new samba-2.0.5a things have really gotten wacky. Samba
has again changed how smbfs shares are mounted. I upgraded both my
samba & autofs off last weeks rawhide and they dont play together.
Hopefully Samba wont be changing that much so a solution will stay
viable for a while...
I reopened this issue simply because of the interactions with Samba
and that the smbmount semantics had changed.
PS. I figured I better get this update in before everybody at Redhat
goes crazy celebrating their newfound wealth after the IPO and wont
recover from their hangover for a week or so. ;-)
*** Bug 2626 has been marked as a duplicate of this bug. ***
autofs now calls smbmnt directly, meaning that only
passwordless shares can be mounted.
IMHO the smbmount command should be used in lieu of smbmnt,
as it allows more options to be passed in.*** Bug 4305 has been marked as a duplicate of this bug. ***
The version of autofs shipped with RedHat6 does not support
the new switches of the smbmount version (also shipped with
Because of this, smb devices can't be mounted by autofs.
You should be able to mount SMB shares with autofs with a line like
smbfoo -fstype=smb,user=foo,passwd=foo ://foo/bar
This works with the latest autofs & samba in the Raw Hide trees.
I have upgraded to 6.1 and I still cant seem to make this work, maybe
I am doing something stupid.
I have the lines in my autofs files as described in this defect.
Below is a log of what looks like a psuedo successful attempt to get
cavanaugh-linux-cavanaug /etc 1042% cd /auto/cavanaugh-nt/d
cavanaugh-linux-cavanaug . 1043% ls
ls: .: Input/output error
cavanaugh-linux-cavanaug . 1044% pwd
cavanaugh-linux-cavanaug . 1045% df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda7 6396215 5230049 834827 86% /
/dev/hda1 38855 7757 29092 21% /boot
/dev/hde1 8583124 1643916 6494128 20% /hfs/d1
/dev/hdg1 8583124 1639935 6498109 20% /hfs/d2
cavanaugh-linux-cavanaug . 1046% cat /etc/mt
cavanaugh-linux-cavanaug . 1046% cat /etc/mtab
/dev/hda7 / ext2 rw 0 0
none /proc proc rw 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hde1 /hfs/d1 ext2 rw 0 0
/dev/hdg1 /hfs/d2 ext2 rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
automount(pid676) /auto/local autofs
rw,fd=6,pgrp=676,minproto=2,maxproto=3 0 0
automount(pid686) /auto/cavanaugh-nt autofs
rw,fd=6,pgrp=686,minproto=2,maxproto=3 0 0
automount(pid698) /auto/cavanaugh-98 autofs
rw,fd=6,pgrp=698,minproto=2,maxproto=3 0 0
//cavanaugh-nt/C /auto/cavanaugh-nt/c smbfs 0 0
//cavanaugh-nt/D /auto/cavanaugh-nt/d smbfs 0 0
Mounting the filesystem by hand using smbmount works fine. Something
is definitely amiss with the interactions with autofs.
------- Additional Comments From 10/26/99 06:54 -------
I've managed to workaround this problem using the following line in
For example, here's the line I used to mount a device called 'test':
test -fstype=smb,user=username,passwd=password ://remote/test
It works with the new samba and the existing autofs packages.
This should all be fixed with the latest versions of mount, samba-client, and
autofs from Raw Hide, slated for our next release. To work properly, your
autofs map should include "fstype=smbfs". Please reopen this bug again if
updating doesn't solve this problem.