[Samba] Autofs and Fedora 11

Stef Bon stef at bononline.nl
Fri Sep 18 09:15:57 MDT 2009


Hello,

mounting with cifs requires an extra option for the ip.

Some time ago I've had the same problem with the auto.smb script in the 
autofs package,
and proposed modifications, simply when using the filesystem cifs, do a 
lookup with the utility
nmblookup like:

ipaddress=$($NMBLOOKUP $key --debug-level=0 2>>/dev/null | grep '<00>' | 
awk '{ print $1 }')

add the found ip address to the options like:

opts="-fstype=cifs,guest,ip=$ipaddress"

If no ip is found you can exit with an errorcode or continue and mount 
without ip, but will propably also exit with error, because that does 
not work.


Attached the modified file. The patch never made it to the source...


Hope it's of any help.

Stef Bon
the Netherlands

ps the name of the attached file is auto.smb.orig, rename this to 
auto.smb and replace the old one with this.



Ian Shay wrote:
>
> > Think that smbclient is using other methods for netbios name resolving,
> > maybe you can try //matsa.full.dns.name or //ip.address
>
> Wow, this seems unfortunate that mount.cifs does not honour smb.conf. 
> At any rate, I cannot use what you are suggesting because the IP 
> addresses are DHCP-assigned and the Linksys router that does the DHCP 
> does not do DNS; it supplies an external DNS server, which of course 
> won't work.
>
> So, given that I don't want to go through the process of giving static 
> IPs and editing fstab or auto.misc every time a new laptop is 
> temporarily added to the network, is there a way to have mount.cifs 
> use BCAST as a way of resolving names?
>
> Furthermore, this was NOT a problem on the older Linux box that I am 
> trying to replace (it has redhat 7 and some older version of samba). 
> What can I do to get at least the same level of functionality as the 
> old one had?
>
> Ian

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: auto.smb.new
URL: <http://lists.samba.org/pipermail/samba/attachments/20090918/4610a5f5/attachment.ksh>


More information about the samba mailing list