autofs with smb doesn't appear to work

Asked by Jason Spashett on 2007-06-05

* installed autofs on ubuntu server 7.04.
* uncomment auto.smb in auto.master
* restart autofs

The defaut installation of autofs doesn't provide a facility for authentication, so I:

* edited auto.smb and added the -A credentials file option to smbclient, and a credfile option to the auto.smb output

autofs still fails to mount shares.

It appears that it doesn't work correctly with cifs, changing the fstype to smb seems to improove things a bit. However the auto.smb doesn't appear to correctly escape shares with $ in them.

Some similar problems appear to be listed on the debian bug tracker:;dist=unstable#_0_3_4

Is there anything I should do to help get this fixed, or wait for ubuntu to include fixes from upsteam. It's a shame that the smb support doesn't work reasonably out of the box
as I would imagine it to be a resaonably often used.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Jason Spashett
Last query:
Last reply:
Massimo Forti (slackwarelife) said : #1

Thanks for your question. Have you try to do:

sudo mount -t cifs /your_server/your_share /mount_point -o user=administrator,password=password,umask=0777,dmask=0777

let me know. Thanks

Jason Spashett (jspashett) said : #2

mount -t cifs //bistromath/share /mnt -o user=administrator,umask=0777,dmask=0777
WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.
mount error: could not find target server. TCP name bistromath/share not found
No ip address specified and hostname not found

However if i use either -t smbfs or the above with the IP address instead of the name it also works. It seems a problem with resolution/syntax above
root@firefly:/# mount -t cifs // /mnt -o user=administrator,umask=0777,dmask=0777
WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.

So it appears to be a problem with name resolution. cifs must only try dns where smbfs seems to try netbios names.

Massimo Forti (slackwarelife) said : #3

OK, the problem is dns. If you try to ping the host name what do you recive. Open a shell and do:

$: ping bistromath

Post the reply. Thanks

Best Jason Spashett (jspashett) said : #4

it doesn't answer. I have already said there is no dns entry. smbfs obviously does a netbois query whereas cifs doesn't. I had assumed that cifs was the new smbfs but it seems they are functionaly different.