|
||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
Facts:
1) There is a Samba server on the local network. 2) Its hostname is 'myserver' and its IP address is 192.168.42.1. 3) The hostname can be resolved via DNS from another computer, as illustrated below: --- 8< --- anothercomputer:~ > ping -c 1 myserver PING myserver (192.168.42.1): 56 data bytes 64 bytes from 192.168.42.1: icmp_seq=0 ttl=128 time=0.4 ms --- myserver ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 0.4/0.4/0.4 ms --- 8< --- However, this does not work: --- 8< --- anothercomputer:~ > mount -t cifs -o username=foo,password=xyzzy \ //myserver/sharename /mnt/foobar mount: Mounting //myserver/sharename on /mnt/foobar failed: \ Invalid argument --- 8< --- Then again, this _does_ work: --- 8< --- anothercomputer:~ > mount -t cifs -o username=foo,password=xyzzy \ //192.168.42.1/sharename /mnt/foobar anothercomputer:~ > --- 8< --- What gives? Any ideas? By googling around a bit it seems there are numerous questions about the same problem on the net - on various mailing lists, forums, and newsgroups - but no answers. * * * Note 1: This is _not_ a WINS problem. I'm not trying to use NETBIOS names! I have no need for NETBIOS name resolution. Note 2: This is not a generic DNS problem, either. As you can see from the 'ping' sample output above, resolving 'myserver' to an IP address works just fine. Note 3: Explicitly adding 'myserver' to the local '/etc/hosts' file does not help, either. I have tried that already. -- znark Jukka Aho |
|
#2
|
|||
|
|||
|
On Mon, 5 Mar 2007 04:59:17 +0200, "Jukka Aho" <(E-Mail Removed)>
wrote: >What gives? Any ideas? The documentation I have quite clearly says that only IP addresses work, Perhaps the reason your search fails to find the answer is that the question pisses off those who read the question and know the answer. http://samba.org/cifs -- buck |
|
#3
|
|||
|
|||
|
buck wrote:
>> What gives? Any ideas? > The documentation I have quite clearly says that only IP addresses > work, Resolving hostnames (or FQDNs) to ip addresses via DNS (or /etc/hosts) is usually a given, so it didn't occur to me to look for the answer specifically from the cifs.txt provided with the kernel. I thought it was a higher-level problem - something to do with /etc/nsswitch, perhaps. > Perhaps the reason your search fails to find the answer is that the > question pisses off those who read the question and know the answer. Or since your answer given above is not exactly correct either, perhaps not too many know the correct answer, in which case it is good to repeat it here for future Google Groups searches, etc.: CIFS needs a special helper app - mount.cifs, which you install to /sbin - to resolve DNS names during mount time. -- znark |
![]() |
| Tags |
| addresses, cifs, hostnames, mount, works |
| Thread Tools | |
| Display Modes | |
|
|