Problem at a glance: the smbmount command resolves the IP address of the share
server from the share name, and ignores the ip=<IP address> parameter described
in the man page.
At home I have a Win98 pc (hostname "meganpc") with c:\temp shared to
the network. I have a Mandrake 6.1 box (it rocks) (hostname "cerberos") as a
firewall running IPchains / IP masquerading to allow and protect access to/from
the cable modem. The internal network is 10.0.0.0/24--meganpc is 10.0.0.50.
Here at the office, I have Mandrake 7.0 (it rocks too) on my Toshiba Tecra. I
would like to use Samba to mount //meganpc/temp to my local /mnt/temp through
ssh local port forwarding.
Step 1: Make the connection
[laptop]# ssh -L 139:meganpc:139 cerberos
root's password:
Last login: Tue Jan 18 2000 11:45:54 -0500
No mail.
[root@cerberos /root]#
###This works fine, I authenticate, and ssh has begun to forward my
localhost:139 to meganpc:139
Step 2: Verify the connection from my laptop
[laptop]# smbclient //meganpc/temp -I localhost -N
added interface ip=xxx.xxx.xxx.xxx bcast=xxx.xxx.xxx.255 nmask=255.255.255.0
smb: \> ls r*
rawrite.exe A 14305 Wed Oct 13 21:45:58 1999
rawwritewin.exe A 208896 Wed Oct 13 21:46:10 1999
ROGET13.TXT A 1410440 Wed Jun 3 08:43:44 1992
rebol-howto.html A 67297 Fri Dec 10 22:03:34 1999
rebol D 0 Sat Dec 11 17:11:20 1999
rp7-complete-setup.exe A 7582720 Sun Jan 9 01:47:08 2000
63883 blocks of size 131072. 35702 blocks available
smb: \>
###So you see this works too. I have successfully redirected meganpc:139 to
localhost:139 and connected to it with Samba's own smbclient command!
Step 3: Mount the drive
[laptop]# smbmount //meganpc/test /mnt/temp ip=localhost guest
error connecting to 10.0.0.50:139 (No route to host)
Connection to meganpc failed
SMB connection failed
===================================================================
So, as you can see with the smbclient command, above, I trust that the ssh
connection is up and running. `netstat -an` shows a local port 139 listening.
I do not have Samba running locally, so there's no port conflict.
It seems to me, that the smbmount command simply does not understand the "ip="
flag. It continues to try and resolve "meganpc" from the netbios share
name--and does so correctly from my /etc/hosts--but that's not the IP address I
want to use! It doesn't accept the address I give it (even 127.0.0.1 or my IP
address). It's interesting that `man smbmount` shows the "ip=" flag, but `man
smbmnt` does not. Is this parameter simply not passed to the real mount
command? Was this simply not implemented?
If anyone can help with this Samba problem, I give you my thanks in advance.
--
Scott Brightwell
Systems Engineer
CTSinc.net