Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cifs mount works with ip but not with hostname
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
user124
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2002
Posts: 86

PostPosted: Sat Oct 03, 2009 4:29 pm    Post subject: cifs mount works with ip but not with hostname Reply with quote

machine "brett" gets it's ip via the dhcp in my router and is pingable from machine "titan" (and vice versa).
the names get resolved by the router.

the problem:
Code:
titan ~ # ping -c2 brett
PING brett (192.168.1.108) 56(84) bytes of data.
64 bytes from brett (192.168.1.108): icmp_seq=1 ttl=64 time=0.282 ms
64 bytes from brett (192.168.1.108): icmp_seq=2 ttl=64 time=0.218 ms
--- brett ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1007ms
rtt min/avg/max/mdev = 0.218/0.250/0.282/0.032 ms

titan ~ # mount -t cifs //brett/home /mnt/floppy/ -o username=am,password=foo,uid=am,gid=am
mount: wrong fs type, bad option, bad superblock on //brett/home,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

titan ~ # tail /var/log/messages
Oct  3 18:00:47 titan [ 2776.849656]  CIFS VFS: cifs_mount failed w/return code = -22

titan ~ # mount -t cifs //192.168.1.108/home /mnt/floppy/ -o username=am,password=foo,uid=am,gid=am
titan ~ # echo $?
0


while name resolution is functional mounting the share via the machine's name isn't possible, only by the ip.
my first thought was that the /etc/hosts entries (127.0.0.1 brett/titan) i made on each machine (xfce4 complains
if the machine's hostname isn't resolvable when no ip is available/dhcp isn't connected) would cause errors but commenting
the lines and server-side smb restart does'nt change anything.

any help is very appreciated :)
Back to top
View user's profile Send private message
ikshaar
Veteran
Veteran


Joined: 23 Jul 2002
Posts: 1339
Location: Baltimore, MD

PostPosted: Tue Oct 06, 2009 7:05 pm    Post subject: Reply with quote

Yeah I used IP myself as I had similar trouble - but it does not help if you are using DHCP.

But now I just found this - seems related - and some option at end of thread to get around the problem of IP resolution that you might use.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462803
_________________
"May God stands between you and harm in all the empty places where you must walk" - Babylon 5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum