LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-05-2005, 10:45 AM   #1
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Rep: Reputation: 0
Windows XP unable to connect to linux with Samba


Hi, I have a Windows XP and a Gentoo Linux on my network. The Gentoo has Samba version 3.0.11. My kernel is a 2.6.10, and I think it has been modified for Gentoo. I can ping each computer from each other. I can't connect to each other using Samba, but I can use the KDE lan browser. When I try to connect to the windows from Gentoo this happens:
Code:
bash-2.05b# mount -t smbfs //192.168.0.194/ShareDocs /mnt/public
Password:
9030: tree connect failed: Call returned zero bytes (EOF)
SMB connection failed
(I have no password on this)
When I try to look at the workgroup from windows I get a message stating the workgroup was not accessible I might not have permission to use it and the network path was not found. When I type \\tux into the run line it tells me that the network name was no longer available.

This is my smb.conf:
Code:
[global]
# Replace MYWORKGROUPNAME with your workgroup/domain
workgroup = WORKGROUP
message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
netbios name = tux
os level = 33
local master = yes
preferred master = yes
wins support = yes
dns proxy = yes
name resolve order = wins lmhosts hosts bcast
# Of course this has no REAL purpose other than letting
# everyone knows it's not Windows!
# %v prints the version of Samba we are using.
server string = Samba Server %v
# We are going to use cups, so we are going to put it in here ;-)
printcap name = cups
printing = cups
load printers = yes
# We want a log file and we do not want it to get bigger than 50kb.
log file = /var/log/samba/log.%m
max log size = 100
# We are going to set some options for our interfaces...
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# This is a good idea, what we are doing is binding the
# samba server to our local network.
# For example, if eth0 is our local network device
interfaces = lo eth0
bind interfaces only = yes
# Now we are going to specify who we allow, we are afterall
# very security conscience, since this configuration does
# not use passwords!
hosts allow = 127.0.0.1 192.168.1.0/24 10.0.0.
hosts deny = 0.0.0.0/0
# Other options for this are USER, DOMAIN, ADS, and SERVER
# The default is user
security = user
# No passwords, so we're going to use a guest account!
guest account = samba
guest ok = yes
# We now will implement the on access virus scanner.
# NOTE: By putting this in our [Global] section, we enable
# scanning of ALL shares, you could optionally move
# these to a specific share and only scan it.

# For Samba 3.x. This enables ClamAV on access scanning.
vfs object = vscan-clamav
vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

# Now we setup our print drivers information!
[print$]
comment = Printer Drivers
path = /etc/samba/printer # this path holds the driver structure
guest ok = yes
browseable = yes
read only = yes
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
write list = luthree,Windows,root

# Now we'll setup a printer to share, while the name is arbitrary
# it should be consistent throughout Samba and CUPS!
[Lexmark-Z12]
comment = Lexmark-Z12 Network Printer
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
printer admin = luthree,Windows,root

# Now we setup our printers share.  This should be
# browseable, printable, public.
[printers]   
comment = All Printers
browseable = no 
printable = yes   
writable = no
public = yes   
guest ok = yes
path = /var/spool/samba
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
printer admin = luthree,Windows,root

# We create a new share that we can read/write to from anywhere
# This is kind of like a public temp share, anyone can do what
# they want here.
[public]
comment = Public Files
browseable = yes
public = yes
create mode = 0766
guest ok = yes
path = /home/samba/public
You may notice I replaced my Windows user's name with 'Windows.' This was due to paranoia, however all capitals have remained the same and I have a user of the same name on the Linux, as well as used smbpasswd on it. I left the password blank.

Thank you in advance.
 
Old 03-05-2005, 01:08 PM   #2
coolamit78
Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: RHEL AS 3/4, Windows XP
Posts: 546

Rep: Reputation: 31
Hi,

First test your samba connection with the smbclient command

smbclient -L 192.168.0.1 -U windows

password

After you enter your password, you will see the list of shared folders on the windows machine. If this works, then u should give the command to mount your samba share.

mount -t smbfs //192.168.0.1/shared /mnt/public -o username=windows

I guess may be u r trying to mount the samba share as guest, still give the above a try..

--amit
 
Old 03-05-2005, 04:59 PM   #3
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the fast reply. I tried entering the command and got this:
Code:
bash-2.05b$ su
Password:
bash-2.05b# smbclient -L 192.168.0.1 -U windows
Error connecting to 192.168.0.1 (Connection refused)
Connection to 192.168.0.1 failed
Okay, that didn't work. Yes, I did change 'windows' to my windows username. Is there anything else I can try? Thank you in advance,
Luthree
 
Old 03-05-2005, 05:47 PM   #4
edcutis
Member
 
Registered: Jun 2003
Location: USA, Missouri
Distribution: mandriva , Kubuntu, MEPIS
Posts: 140

Rep: Reputation: 15
before you can connect to samba, you must make samba users smbpasswd -a luthree

It helps if the user names are the same for both XP and linux. Also smbclient dows not need SU access. you can do it quite well from your normal user account (after you have made a samba password)

[dad@dingo47 dad]$ smbclient -L localhost
Password: xxxxxxx
Domain=[MIDGET] OS=[Unix] Server=[Samba 3.0.10]

Sharename Type Comment
---------
Disk Network Logon Service
homes Disk Home Directories
public Disk Public Stuff
IPC$ IPC IPC Service (Samba Midget Server 3.0.10)
ADMIN$ IPC IPC Service (Samba Midget Server 3.0.10)
dad Disk Home Directories
Domain=[MIDGET] OS=[Unix] Server=[Samba 3.0.10]
Server Comment
--------- -------
DINGO1SERVER Samba Midget Server 3.0.10
LIACS-EIB nathans machine

Workgroup Master
--------- -------
MIDGET DINGO1SERVER

Hope this helps
 
Old 03-06-2005, 06:04 PM   #5
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, I did the 'smbpasswd -a username' thing already. I tried the smbclient and it gives:
Code:
bash-2.05b$ smbclient -L localhost
Password:
Anonymous login successful
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.11]

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        Lexmark-Z12     Printer   Lexmark-Z12 Network Printer
        public          Disk      Public Files
        IPC$            IPC       IPC Service (Samba Server 3.0.11)
        ADMIN$          IPC       IPC Service (Samba Server 3.0.11)
Anonymous login successful
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.11]

        Server               Comment
        ---------            -------
        PC
        TUX                  Samba Server 3.0.11

        Workgroup            Master
        ---------            -------
        WORKGROUP            TUX
I tried to access from windows and got the same error. Can you give me something else?
Thank you,
Luthree
 
Old 03-06-2005, 06:48 PM   #6
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Oh yeah, One thing. I have a hardware firewall integrated with my router. I think it filters my LAN as well as my WAN connection. Could that be the problem? If so, which ports should I open?
 
Old 03-07-2005, 03:14 PM   #7
Not now, John!
Member
 
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161

Rep: Reputation: 30
Try
Code:
iptables -A INPUT -i eth0 -p tcp -m multiport --dports 137,138,139,445 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -m multiport --dports 137,138,139,445 -j ACCEPT
 
Old 03-07-2005, 09:00 PM   #8
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, I tried entering that, no go. I don't even have iptables on. I tried using nmap. I got only 1 unfiltered udp port(137) and 2 other ports(137,138) are blocked on the XP. I tried to drop the firewall, still blocked. I went and installed Norton Internet Security, turned it off and uninstalled it. I had it installed before and unistalled it, thinking I might have left the firewall on. Most of it's ports are still closed. I even have the windows firewall off. The XP has SP2. Any ideas?(By the way, now the XP dosen't even detect itself on the Network Neighborhood, I think it was yesterday.)
 
Old 03-08-2005, 07:19 PM   #9
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Just looked over my firewall logs. The ports are open on the firewall but not on the XP. I have no firewall on the XP.
 
Old 03-09-2005, 08:47 PM   #10
luthree
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Please can anyone give me some advice? Could it be Norton IS which I uninstalled? I think otherwise I have a fairly normal installation on the XP.
 
Old 03-22-2005, 01:16 PM   #11
dent_a
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
You are asking to connect to a share that does not exist. There is no "ShareDocs" only "public"

Karl-
 
Old 03-22-2005, 01:29 PM   #12
drjimstuckinwin
Member
 
Registered: Mar 2001
Location: Manchester UK
Distribution: Mainly Fedora
Posts: 496

Rep: Reputation: 30
Irrespective of whether you're accessing the wrong share name in the latest bit of testing, the bottom line is that you can't connect win XP to Samba. This drove me mad for ages - even tried disabling PW encryption. I fixed it, then rebuilt my server and spent another day pulling my hair out remembering what to fix. I fiddled with options in SWAT until it worked. Basically it's something to do with secure channels whatever they are!

Add these lines into your smb.conf straight after server string = Samba Server %v, and I think it'll work.

client schannel = No
server schannel = No

Regards

Jim
 
Old 03-22-2005, 05:30 PM   #13
dent_a
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
What are you saying? That a person can not connect WinXP to Samba? I have been doing this since 2.2 and have the latest 3.0.12 built from source rpms running on Centos4. I have not had to use client schannel = No or server schannel = No; yet.

Ok I appologize. I must read the whole post before answering, so I am sorry I did not do that. I understand that luthree is looking to get a windows share mounted onto linux. It has been said or I read it that the mount smbfs is not related to having samba running. I have mounted and not had samba running on the mounting box.

I just mounted to my WinXP machine with:
mount -t smbfs //192.168.200.9/MP3 /mnt/test

Prompted for "password:" hit return and mounted. Course I have it wide open for anyone to access it.

Use this to use username and passwd :
mount -t smbfs -o username=USER,password=PASS //192.168.200.9/MP3 /mnt/test
 
Old 03-10-2007, 07:54 AM   #14
kmccrory
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Check your file shares

I was getting the same problem. I had been playing around with users and groups.
I had user home directories shared out. I deleted the home shares and it cleared up the problem.

I'd check all of your file shares from your smb.conf file to ensure the paths are correct. Try commenting out the shares and restoring them one at a time.

Cheers
 
  


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
new to samba - unable to connect PerfectReign Linux - Networking 2 08-02-2005 04:31 PM
Samba: can't connect to my local linux machine but can connect to windows. Royle Linux - Networking 3 01-18-2005 06:32 PM
connect from windows to linux using samba tonan Linux - Networking 2 10-04-2004 01:11 PM
Samba Printer (Unable to Connect) ghight Linux - Software 8 07-17-2003 08:05 AM
Linux unable to connect to another Linux machine via Samba (SMB) Please help shassouneh Linux - Networking 4 03-11-2002 03:26 AM


All times are GMT -5. The time now is 04:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration