LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2009, 07:34 AM   #1
FLLinux
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora 9, LFS 6.3, Unbuntu 8.04, Slax 6.0.7
Posts: 145

Rep: Reputation: 15
Question mount -t smbfs error can't resolve hostname


I am trying to mount a NAS device using the hostname on my linux computer (running slax)

The command I am using is
mount //hostname/sharename /mnt/test -t smbfs -o username=***,password=***

i am getting back the error
mount error: could not find target server. TCP name hostname/sharename not found
No ip address specificed and hostname not found

I can do this mount from an older version of SLAX but i can't from this new version. smb:/ can find then through the file explorer window but I can't mount them from the command line.

Is there something i am doing wrong?

Thanks
 
Old 09-25-2009, 01:49 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Can you ping the NAS by the hostname? Try the command "getent hosts hostname", using the hostname of the nas.
Netbios styled hostnames and real hostnames aren't exactly the same animal. Make sure that you don't use any characters that are legal for one but not the other. No underscores IIRC but minus signs are OK. No periods in the hostname itself. That would make the hostname look like a FQDN.

Also, is the hostname present in your /etc/hosts file. If it isn't perhaps you used the avahi dns daemon in your previous distribution, but not in this one or it isn't running. If it is running you can try pinging like "ping hostname.local".

Make sure that you have the ports open that you need. The name service for smb uses 137/UDP. Opening 137/TCP and forgetting to open the UDP ports is a common mistake. Even running nmap against a machine without options, you could miss the problem.
Code:
netbios-ns      137/tcp    # NETBIOS Name Service
netbios-ns      137/udp    # NETBIOS Name Service
netbios-dgm     138/tcp    # NETBIOS Datagram Service
netbios-dgm     138/udp    # NETBIOS Datagram Service
netbios-ssn     139/tcp    # NETBIOS Session Service
netbios-ssn     139/udp    # NETBIOS Session Service
...
microsoft-ds    445/tcp    # Microsoft-DS
microsoft-ds    445/udp    # Microsoft-DS
At home, because I only have about 6 addresses needed (including router, printer, external drive) I added the MAC address / IP address values to my router. This enables me to add all of the devices to the /etc/hosts file, and not have an IP address change when the lease runs out or the router is reset. I found that resolving names using the avahi daemon (zero config in Windows, Bonjour on the Mac) was to slow. For a larger network, I would probably run the dnsmasq daemon instead to avoid maintaining an /etc/hosts file for each computer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 5 = Input/output error" but smbfs works! humbletech99 Linux - Networking 36 12-18-2019 02:59 AM
Trying to Mount NAS on 32 bit RHEL givng error as smbfs : mount_data version 19192513 kvamc Linux - Hardware 2 04-04-2008 02:21 AM
samba mount error on smbfs and cifs tajamari Linux - Networking 2 08-06-2007 09:30 PM
mount -t smbfs error skimmer Linux - Networking 5 11-07-2005 02:50 AM
Mandrake 10 "mount smbfs" the win2000 folder from vmware error wuyeguo Mandriva 1 03-19-2004 06:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:36 PM.

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