Review your favorite Linux distribution.
Go Back > Blogs > linux-related notes
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rating: 3 votes, 4.33 average.

Solved: "mount error: could not resolve address for <hostname>. No address associated with hostname"

Posted 01-05-2011 at 06:19 PM by the dsc
Updated 01-05-2011 at 06:24 PM by the dsc

This error may happen when trying to mount a cifs/smbfs share, be it either via fstab or command line. Most people seem to either not have the problem or circumvent it by using static IPs instead of hostnames, which will work only as long as the IPs don't change. Funnily enough, it seems that for some people the problem is exactly the other way around, IPs won't work, only the hostname. Weird. This is also kind of funny/infuriating as the share will be readily accessible via konqueror, and perhaps some other file managers that can reach samba shares, and the name will be there.

Anyway, the way I found to fix it for me was to add "wins" on the /etc/nsswitch.conf file. I had "wins" previously installed for some reason, probably due to some earlier attempt at doing the same thing, but as it seems, the installation process does not change the configuration files as needed to actually work.

Here's the line I added "wins" to:

hosts:          files mdns4_minimal [NOTFOUND=return] dns wins mdns4

And here's where I found it: http://ubuntu-virginia.ubuntuforums....36&postcount=8 (in Spanish)

Nearly at the end of this lengthy post.
Posted in Uncategorized
Views 33813 Comments 1
« Prev     Main     Next »
Total Comments 1


  1. Old Comment
    To get the job work, you also need to:
    sudo apt-get install winbind
    Posted 03-10-2013 at 10:11 AM by bzhao bzhao is offline


All times are GMT -5. The time now is 12:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration