f



'mount -t cifs' only works with IP addresses, not with hostnames

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

0
jukka.aho (18)
3/5/2007 2:59:17 AM
comp.os.linux.networking 15677 articles. 0 followers. Post Follow

2 Replies
391 Views

Similar Articles

[PageSpeed] 26

On Mon, 5 Mar 2007 04:59:17 +0200, "Jukka Aho" <jukka.aho@iki.fi>
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

0
buck1 (239)
3/5/2007 7:04:57 PM
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

0
jukka.aho (18)
3/8/2007 1:38:01 AM
Reply:

Similar Artilces:

RE: Obsucure Inquier article about Intel mentions VMS (and not any other OS') other OS') other OS') other OS') other OS') other OS') other OS') other OS') other OS') other OS') other
> -----Original Message----- > From: JF Mezei [mailto:jfmezei.spamnot@teksavvy.com]=20 > Sent: October 11, 2004 11:45 PM > To: Info-VAX@Mvb.Saic.Com > Subject: Re: Obsucure Inquier article about Intel mentions=20 > VMS (and not any other OS') other OS') other OS') other OS')=20 > other OS') other OS') other OS') other OS') other OS') other=20 > OS') other OS') other OS') other OS') other OS') other OS') other=20 >=20 > "Main, Kerry" wrote: > > Course, there are many ways to offer differen...

After linux's network works, win XP's network cannot work ?
I installed Redhat linux 9.0 in one of my disk partition . at first, linux cannot recognize broadcom 440x's ethernet card. Then I download driver through broadcom.com and successfully installed the ethernet driver. Now I can surf the net in linux. But when I return to win XP , it displays "a network cable is unplugged", but the device is working properly. (the cable is indeed plugged) So I failed to link to Internet in XP,but can go online in linux. Any great man know how this happened? How to solve this problem? Thanks! winwish@gmail.com wrote: > I installed Redhat linux...

RE: Obsucure Inquier article about Intel mentions VMS (and not any other OS') other OS') other OS') other OS') other OS') other OS') other OS') other OS') other OS')
> -----Original Message----- > From: Soterro [mailto:soterroatyahoocom@address.hp.com]=20 > Sent: October 11, 2004 9:43 AM > To: Info-VAX@Mvb.Saic.Com > Subject: Re: Obsucure Inquier article about Intel mentions=20 > VMS (and not any other OS') other OS') other OS') other OS')=20 > other OS') other OS') other OS') other OS') other OS') >=20 > Main, Kerry wrote: > >>From: John Smith [mailto:a@nonymous.com]=20 > >>You aren't directly to blame for this and I know you'd like=20 > >>to keep your > &...

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y&qu...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

'~' and '`' keys not working
Hi all, I have FreeBSD 7.2 installed under Parrellel on MAX OSX 10.5.8, however I discovered that the '`' key and the '~' key where not working on the CLI on FreeBSD. I have tried a couple of different shells and googled for a bit but still no joy. Has this happened to anyone else. What did you do to fix it. -- ..... "When asked what he would like on his tomb stone he said more bass" Aaron Spiteri <azzmosphere> wrote: > Hi all, > > I have FreeBSD 7.2 installed under Parrellel on MAX OSX 10.5.8, however > I discovered that t...

Will changing IP address affect 'rlogin'/'telnet'?
Currently I have two machines SUNOne and SUNTwo. Their IP addresses are: SUNOne: 111.76.90.155 SUNTwo: 111.76.90.115 So far, I was doing 'rlogin' and 'telnet' from SUNOne to SUNTwo. Now, for some reasons, the IP address of SUNTwo will be changed to 180.76.90.115. Will it be possible to do the 'rlogin' and 'telnet', from SUNOne to SUNTwo, now? If no, what needs to be changed for 'rlogin' and 'telnet' to work? qazmlp1209@rediffmail.com (qazmlp) writes: > Currently I have two machines SUNOne and SUNTwo. > Their IP addresses are: > SUN...

do 'os.path' include 'os' for us?
Hi, I wrote a python script to list files in a directory but somehow did it wrongly by importing os.path instead of os. To my astonishment, it works just as charm: #!/usr/bin/python import os.path for file in os.listdir('/root/'): print file I was wondering why? os.path doesn't contain listdir, why there is no complaint like 'os: unknown name'? Does this mean, instead of importing os, we can import os.path? Thanks. On Mar 27, 6:41=A0pm, Jerry Fleming <jerry.flem...@saybot.com> wrote: > Hi, > > I wrote a python script to list files in a directory but ...

Is different 'Ethenet address' from 'Mac Address' ?
Hi. I was trying to retrieve 'mac address' via composing small program. First, I used 'ifreq.ifr_enaddr' (<- Comment of this is '/*ethenet address*/'.) with 'iotcl' and 'CSIOCGIFCONF'. As(?) u know, I couldn't retrieve 'mac address'. Then, I used 'arpreq.arp_ha'. I could get 'mac address'. But, this code, using 'arpreq.arp_ha', is not working correctly in Linux. Ok,ok, I see. Linux is not Unix. :) here is the point. I'm so curious what is diffrence of 'ethenet address' from 'mac address'. ...

'Linux is perfect' and 'Linux is perfect for' idiocy
Straight up 'Linux is perfect' idiocy: ========================================================================= "Linux is perfect." Posted by: unknown at March 26, 2005 03:57 PM http://www.goodexperience.com/tib/archives/2005/03/apple_mail_filt.html "Linux is perfect." http://www.deadtroll.com/index2.html?/video/ossuckscable.html~content "Linux is perfect: its open source nature and excellent shell make it the ultimate hobbyist's operating system." http://www.techradar.com/news/software/applications/top-50-best-linux-apps-2011-1014373 ...

web('file', 'filename' '-browser') not working
Hello, I'm working on a project involving Matlab and a nice flashy GUI. To call help files, I do: web('file', 'help.html' '-browser'); On my computer, this works. After compiling it, it works. If I manage to get the current directory wrong, somehow, the browser attempts to go to www.help.com, rather than put up an error. So far so good, except when the file isn't there, which I'm ignoring for the moment. However, when I run the program on other computers (I compile the program first), it always goes to www.help.com, no matter what the pwd says, or where ...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked for...

'' TriScatteredInterp function not working ?? ''
Dear community, you 've already provided me with lot of knowledge through this website by watching other people's post. Is the first time that i write here and i'd like to ask about the TriScatteredInterp function. I have a bathymetric file (containing x,y coordinates in the first 2 columns and depth values (z) in the 3rd column). I am trying to create a grid so i execute in matlab the script below. My problem is that when i execute the last line -> ZI = F(X,Y); <- ZI values are not equal on size with XI,YI values. Do you know why this is happening ? Any sollutions? Thank...

'more' fails, but 'vi' works??
'more <fileName>' does not show anything in the file. It exits immediately without showing the contents. But, I can do 'vi'. The 'ls -l <fileName>' also shows 80 bytes as the size and all the permission bits are set. 'file <fileName>' shows <fileName>: commands text What is the reason why the 'more <fileName>' fails? In article <1171696623.532022.125720@t69g2000cwt.googlegroups.com>, <qazmlp1209@rediffmail.com> wrote: >'more <fileName>' does not show anything in the file. It exits >im...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Hi, Thanks for ur help there HJ. I know how to do the tasks you specified there. I would like for the update query to use field values from some of the fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, DateTo. My problem is that an append/update query can't find the values in the open Form (frmInvoices) when I specify them as; [Forms]![frmInvoices]![InvoiceNumber] a select query has no problem finding the field values on a form. please help. Aaron Hi Aaron, Could you post the entire code that you are having trouble with? Now it is not possible to see what goes wron...

Web resources about - 'mount -t cifs' only works with IP addresses, not with hostnames - comp.os.linux.networking

Resources last updated: 2/3/2016 10:27:49 AM