LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2008, 09:14 AM   #1
soliberus
LQ Newbie
 
Registered: Feb 2008
Posts: 6

Rep: Reputation: 0
Unable to connect to Samba share (XP client, RHES5 server)


OS:
Red Hat ES 5.2

Kernel:
2.6.18-92.1.18.el5

Samba version:
[root@intranet samba]# rpm -qa |grep samba
system-config-samba-1.2.39-1.el5
samba-common-3.0.28-1.el5_2.1
samba-client-3.0.28-1.el5_2.1
samba-3.0.28-1.el5_2.1

When I try to connect to the share from my XP machine, I get a "network path cannot be found" error message.

Below is the entry in /var/log/samba/samba.log

[2008/11/19 11:57:51, 0] smbd/service.c:make_connection_snum(1003)
'/server2/test' does not exist or permission denied when connecting to [server2] Error was Permission denied

Here is my smb.conf file:

[global]
# Server name
server string = Intranet Server (Primary)

# These are the default password settings.
; encrypt passwords = yes
; smb passwd file = /etc/samba/smbpasswd

# Define NT domain/workgroup name.
workgroup = intranet

# Security mode. (See SAMBA documentation for details.)
; security = user

# Restrict conections to specific IP addresses.
hosts allow = all

# The %m variable sets a separate log file for each
# connecting machine.
# log file = /var/log/samba-log.%m
# Keep it basic - one file!
log file = /var/log/samba/samba.log

# The number of minutes inactivity before a connection is
# disconnected. (This disconnection should be transparent to most
# clients, which an have auto-reconnect feature. Removing inactive
# connections is to preserve the server's resources.)
deadtime = 10

# These socket options are suggested in the default smb.conf file.
# Who am I to disagree?
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Define both Ethernet interfaces. (Otherwise, I suspect only one
# will be configured??)
interfaces = eth0 eth1
username map = /etc/samba/smbusers
; guest ok = no
; guest account = nobody


[server2]
comment = server2
path = /server2/test
write list = @intranet
force create mode = 775
force directory mode = 2775
writeable = yes
; browseable = yes
valid users = intranet

/server2 and /server2/test are owned by user intranet and both directories have permissions set to 777.

Has anyone come across this problem in the past?
 
Old 11-20-2008, 07:28 AM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
uncomment security = user

... and while we're checking basics:
did you run smbpasswd?

Last edited by secesh; 11-20-2008 at 07:30 AM.
 
Old 11-21-2008, 05:51 AM   #3
soliberus
LQ Newbie
 
Registered: Feb 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I did run smbpasswd -a <username>

It turned out that SELinux and IPTables were the culprits.

I had to run "# chcon -t samba_share_t /path" on the directories I've created.

I also had to open the ports that clients use to connect to Samba.

Edit /etc/sysconfig/iptables and add the following 4 lines just before the line with "-j REJECT" in it:

-A RH-Firewall-1-INPUT -p udp -m udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
 
Old 11-21-2008, 06:23 AM   #4
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
Get rid of that newbie tag; great job solving your own problem!
 
  


Reply



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 client Access denied unable to connect Systest7 Linux - Networking 11 12-12-2010 08:45 PM
Unable to mount NFS share present on server to client vathsan AIX 1 11-10-2008 11:19 PM
Connect to server share from different subnet. Samba? Biggen Linux - Software 4 03-16-2007 02:40 PM
Samba:Unable to connect shares from win2k client vikram_cvk Linux - Software 8 03-22-2004 12:14 AM
Samba:Unable to connect shares from win2k client vikram_cvk Linux - Software 0 01-13-2004 06:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:01 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