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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-12-2004, 02:40 PM
|
#1
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Rep:
|
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?
|
|
|
08-12-2004, 03:03 PM
|
#2
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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?
|
|
|
08-12-2004, 03:07 PM
|
#3
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
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)
|
|
|
08-12-2004, 06:29 PM
|
#4
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
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.
|
|
|
08-13-2004, 12:14 AM
|
#5
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
try mounting that windows share by
#smbmount '//192.168.0.20/Documents' /mnt/samba
regards
gaurav
|
|
|
08-13-2004, 01:10 AM
|
#6
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
That didn't work before either, but, like I said, putting the line in /etc/hosts finally fixed it. Thanks anyway though!
|
|
|
08-13-2004, 04:21 AM
|
#7
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
08-13-2004, 01:41 PM
|
#8
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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.
|
|
|
08-14-2004, 03:56 PM
|
#9
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
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.
|
|
|
08-15-2004, 03:48 PM
|
#10
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
08-15-2004, 04:37 PM
|
#11
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
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)
|
|
|
08-15-2004, 04:54 PM
|
#12
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
08-15-2004, 04:57 PM
|
#13
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Original Poster
Rep:
|
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 09:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|