Hide Forgot
From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) Description of problem: I've created a simple "program" map for samba shares, very much the same as for NFS: # cat /etc/auto.smb #!/bin/sh key="$1" smb_auth="/etc/samba/dets.auth" smb_opts="-fstype=smbfs,nonstrict,credentials=$smb_auth" smbclient -L $key -A $smb_auth 2>/dev/null | grep Disk | grep -v '\$' | sort +0 | \ awk -v key="$key" -v opts="$smb_opts" -- ' BEGIN { ORS=""; first=1 } { if (first) { print opts; first=0 }; print " \\\n\t/" $1, "://" key "/" $1 } END { if (!first) print "\n"; else exit 1 } ' For example, on host "monacan" this map produces the following output: # ./auto.smb monacan -fstype=smbfs,nonstrict,credentials=/etc/samba/dets.auth \ /dets ://monacan/dets \ /public ://monacan/public However, this doesn't work as expected: $ ls -l /smb/monacan ls: /smb/monacan: No such file or directory Log attached (mount_with_colon.txt) Probably this is the problem: dequote("://monacan/dets") -> ://monacan/dets I think to work without the problem it should be: dequote("://monacan/dets") -> //monacan/dets (":" should be removed). On the other hand, in the Internet are some examples (i.e. http://www.greenfly.org/tips/autofs.html) of a bit different syntax for automount map, without a colon: # ./auto.smb monacan -fstype=smbfs,nonstrict,credentials=/etc/samba/dets.auth \ /dets //monacan/dets \ /public //monacan/public After such change (that is AGAINST the documentated in the man pages) mounting doesn't work either. Log attached (mount_without_colon.txt) In this case parsing of the mount is completely broken, autofs doesn't see different shares, treats them as one... :-( Version-Release number of selected component (if applicable): autofs-4.1.2-2 How reproducible: Always Steps to Reproduce: 1. Create provided /etc/auto.smb script. 2. mkdir /smb 3. add "/smb /etc/auto.smb --timeout=60" to /etc/auto.master 4. service autofs restart 5. ls -l /smb/<your samba host> Expected Results: I think that automount is expected to mount samba shares given the first syntax (with ":"). Or with second, but in this case man pages should be fixed. Anyway, one or both of this methods should work...
Created attachment 101540 [details] Logs of mount attempt with ":" in share name
Created attachment 101541 [details] Logs of mount attempt without ":" in share name
Created attachment 101542 [details] Patch to allow mounting of samba shares without colon I'm providing a small patch that allows mounting of samba shares if they are given in multimount map in format _without_ colon (as an examples in Internet) simply because it is simplier and should not break anything (I've tested with nfs & smbfs mounts). Patch to allow mounting in format described in man ("If the filesystem to be mounted begins with a / (such as local /dev entries or smbfs shares) a : needs to be prefixed (e.g. :/dev/sda1).") will be a bit more complex - it seems to me that such functionality is completely broken in modules/parse_sun.c and never actually worked.
I don't know why the qa contact was removed.
This should be fixed in the latest available fc3 update (autofs-4.1.3-114). Please reopen this bug if this is not the case.