LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2004, 02:40 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question 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?
 
Old 08-12-2004, 03:03 PM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
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?
 
Old 08-12-2004, 03:07 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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)
 
Old 08-12-2004, 06:29 PM   #4
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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.
 
Old 08-13-2004, 12:14 AM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
try mounting that windows share by

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

regards

gaurav
 
Old 08-13-2004, 01:10 AM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
That didn't work before either, but, like I said, putting the line in /etc/hosts finally fixed it. Thanks anyway though!
 
Old 08-13-2004, 04:21 AM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 08-13-2004, 01:41 PM   #8
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
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.
 
Old 08-14-2004, 03:56 PM   #9
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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.
 
Old 08-15-2004, 03:48 PM   #10
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 08-15-2004, 04:37 PM   #11
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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)
 
Old 08-15-2004, 04:54 PM   #12
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 08-15-2004, 04:57 PM   #13
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Samba not connecting to windows shares, help pls john_d13 Linux - Software 0 12-18-2004 01:27 AM
Accessing samba shares from a windows machine lacitpo Linux - Software 2 12-13-2004 07:47 AM
Connecting to windows shares major_error Linux - Networking 0 02-17-2004 03:56 PM
connecting to another windows machine caesarkim Linux - Networking 7 11-26-2003 01:45 PM
Connecting Windows Shares Tezdread Linux - Networking 9 01-09-2003 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:20 PM.

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