LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Connecting to shares on a Windows machine (https://www.linuxquestions.org/questions/linux-newbie-8/connecting-to-shares-on-a-windows-machine-216788/)

jrdioko 08-12-2004 01:40 PM

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?

Disillusionist 08-12-2004 02:03 PM

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?

jrdioko 08-12-2004 02:07 PM

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...
session request to windowsipaddresshere failed (Called name not present)
session request to 192 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)


jrdioko 08-12-2004 05:29 PM

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.

masand 08-12-2004 11:14 PM

try mounting that windows share by

#smbmount '//192.168.0.20/Documents' /mnt/samba

regards

gaurav

jrdioko 08-13-2004 12:10 AM

That didn't work before either, but, like I said, putting the line in /etc/hosts finally fixed it. Thanks anyway though!

masand 08-13-2004 03:21 AM

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

Disillusionist 08-13-2004 12:41 PM

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.

jrdioko 08-14-2004 02:56 PM

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.

masand 08-15-2004 02:48 PM

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

jrdioko 08-15-2004 03:37 PM

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
added interface ip=155.156.0.1 bcast=155.156.0.255 nmask=255.255.255.0
Password:
smb: \>

versus

Code:

$ smbclient //155.156.0.5/shared
added interface ip=155.156.0.1 bcast=155.156.0.255 nmask=255.255.255.0
session request to 155.156.0.5 failed (Called name not present)
session request to 155 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)


masand 08-15-2004 03:54 PM

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

jrdioko 08-15-2004 03:57 PM

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.