Connecting to shares on a Windows machine
This question definitely fits in the newbie category and I was sure it'd been asked before, but I couldn't find the answer with a search. I'm trying to transfer some files from my Windows box over to my Linux laptop, and I figured the easiest way would be to hook up a crossover cable and get to them that way (and, if I understand it correctly, using Linux to access Windows shares doesn't require samba). I used ifconfig to set up my ip and netmask to be on the same subnet as the other computer, and then tried "smbclient //machinename/sharename" and got a "added interface..." message, but then it says "Connection to machinename failed." I thought usernames had something to do with it, so I did an adduser for the name of the user I use on the other Windows box to connect to the one I'm trying to get the files from and did the smbclient command as that user but it didn't make any difference. What am I missing here?
|
Is machinename set up in /etc/hosts?
You could try using the ip address instead eg: //10.1.1.2/sharename Can you ping the windows machine? |
I can ping the machine. I didn't have it set up in /etc/hosts so that explains why that wasn't working. When I use the IP I get the following:
Code:
added interface... |
Hmm... not sure why the IP didn't work but I added a line to /etc/hosts and tried it again and everything worked fine.
|
try mounting that windows share by
#smbmount '//192.168.0.20/Documents' /mnt/samba regards gaurav |
That didn't work before either, but, like I said, putting the line in /etc/hosts finally fixed it. Thanks anyway though!
|
pl. correct ,me if i am wrong
how can ip addreess not work for u what u r doing in /etc/hosts is just mapping ur ip to a machine name so i think if we use ip addres that should work regards |
Generally I would have to agree, there should be no difference between using the IP address and using a name
(which refers to an IP address in /etc/hosts). However the wonders of MS Windows will never cease to amaze me. |
It looked like smbclient was getting confused when it got numbers instead of letters, but I have no idea why the IP didn't work.
|
hi
i have beeen using IP adress with smbclient and they have been workin correctly for me pl. give it a try once again and keem us posted regards gaurav |
I've tried it again and again. Here's the exact output from each command (with IPs and computer names changed):
Code:
$ smbclient //compname/shared Code:
$ smbclient //155.156.0.5/shared |
hi there
i am amazed at the output but can u also please try this out #smbclient '//192.168.0.20/homes' -U <username> regards gaurav |
I tried that with every username I've ever used on both computers and it gives the same result as above when using the IP.
|
All times are GMT -5. The time now is 04:10 AM. |