LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-03-2011, 05:10 PM   #1
jonathansfl
LQ Newbie
 
Registered: Dec 2010
Distribution: Ubuntu 10.04
Posts: 11

Rep: Reputation: 0
Question Mount Win2K3 Network share fails if using hostname instead of IP Address


Using Ubuntu 10.04LTS
Why must I use the IP address to mount a (Win2K3 Svr) network drive using cifs or smbfs?
I have the Windows server in my /etc/hosts file as: my_hostname_which_pings_fine 192.168.1.40
pinging hostname: my_hostname_which_pings_fine returns a solid ping.

WORKS:
Code:
sudo mount -t cifs //192.168.1.40/Photos /media/mnt_club_id_images -o username=replication,password=mypassword
sudo mount -t smbfs //192.168.1.40/Photos /media/mnt_club_id_images -o username=replication,password=mypassword
FAILS:
Code:
sudo mount -t cifs //my_hostname_which_pings_fine/Photos /media/mnt_club_id_images -o username=replication,password=mypassword
sudo mount -t smbfs //my_hostname_which_pings_fine/Photos /media/mnt_club_id_images -o username=replication,password=mypassword
when i run the failing commands at command prompt I get error:
Quote:
mount.cifs kernel mount options: unc=//bst_webserver\Photos,ver=1,rw,username=replication,ip=192.168.1.40,pass=********
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
dmesg says:
Quote:
CIFS VFS: cifs_mount failed w/return code = -5
Why does the hostname usage fail but the IP Address usage succeeds??
 
Old 01-05-2011, 02:49 AM   #2
120
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 9
Just a stab in the dark here, but when mounting you are using a netbios name that requires netbios resolution as opposed to a hostname that requires hostname resolution. Hence you can ping it as a host, but not mount it as a different name resolution process is in place.

Like I say, it's a guess - but this may throw more light on it:

http://ubuntuforums.org/showthread.php?t=88206
 
Old 01-05-2011, 07:47 AM   #3
jonathansfl
LQ Newbie
 
Registered: Dec 2010
Distribution: Ubuntu 10.04
Posts: 11

Original Poster
Rep: Reputation: 0
thanks. Nope.
I tried what that guide suggested:
sudo nano /etc/nsswitch.conf
update line: hosts: files dns
to: hosts: files wins dns
sudo apt-get install winbind
(winbind was already installed)

still get same errors:
dmesg: CIFS VFS: cifs_mount failed w/return code = -5
cmd prompt error: mount error(5): Input/output error
Refer to the mount.cifs(8)
 
Old 01-05-2011, 08:51 AM   #4
120
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 9
Quote:
Originally Posted by jonathansfl View Post
thanks. Nope.
I tried what that guide suggested:
sudo nano /etc/nsswitch.conf
update line: hosts: files dns
to: hosts: files wins dns
sudo apt-get install winbind
(winbind was already installed)

still get same errors:
dmesg: CIFS VFS: cifs_mount failed w/return code = -5
cmd prompt error: mount error(5): Input/output error
Refer to the mount.cifs(8)
A quick search of the forum for:

Quote:
"cifs_mount failed w/return code = -5"
Gives this:

http://www.linuxquestions.org/questi...t-fail-469006/

I can't say if that sheds any more light on your problem as it may be a bit 'Fedora-esque' - but the core reason for the -5 may be answered, or it may give you some clues for further searching and troubleshooting.
 
  


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
NFS share in fstab fails to mount, but where is the log? gumpish Linux - Software 7 08-19-2009 07:22 PM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 11:28 AM
Get hostname from IP address on internal network tekmann33 Linux - Newbie 4 11-09-2007 09:44 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
smbclient to win2k3 share ew0kian Linux - Software 1 07-29-2003 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:09 AM.

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