LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-23-2010, 03:47 PM   #1
kphannan
LQ Newbie
 
Registered: Jan 2010
Location: Atlanta
Distribution: CentOS Intel 64, Red Hat, Mandrake
Posts: 4

Rep: Reputation: 0
Unable to access Samba share on CentOS 5.4 from windows XP or Vista


I can't be the first one with this problem. What am I missing?

I have setup Samba servers in the past, just none under SELinux. The last one I configured was a couple years ago, so I wouldn't doubt I'm a bit rusty.


---- Environment summary:
Clean server install of CentOS 5.4 includes SELinux
- lets call this 'server'
- updated samba to 3.0.33-3.15.el5_4.1

Client1 - Windows XP sp4 - WINS configuration uses 'server' noted above
Client2 - Windows Vista - WINS configuration uses 'server' noted above

---- What works / what doesn't ------
Clients can see the server (XP and vista) in network neighborhood.
The following does not work from windows (xp or vista)
net view
net view \\server
net view \\server-ip
net view \\server\share

This does work on the server
smbclient -L \\server
smbclient -L \\server --user validuser
smbclient -L \\client1 --user validuser


---- What I have configured and tried (config/output below) --------
firewall ports for samba are open
SELinux enforcing or permissive
file context is set on share
samba booleans are set

***firewall
-A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m tcp -p udp --dport 139 -j ACCEPT

***SELinux mode/booleans
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 21
Policy from config file: targeted

# getsebool -a | grep smb
allow_smbd_anon_write --> off
smbd_disable_trans --> on

# getsebool -a | grep samba
samba_domain_controller --> on
samba_enable_home_dirs --> on
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_share_fusefs --> off
samba_share_nfs --> off
use_samba_home_dirs --> on
virt_use_samba --> off

***filesystem
# semanage fcontext -a -t samba_share_t /share/photos(/.*)?
# restorecon -R -v /share/photos

***Disks
]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 9920624 2070872 7337684 23% /
/dev/sda1 101086 19146 76721 20% /boot
tmpfs 1846656 0 1846656 0% /dev/shm
/dev/mapper/VolGroup00-xen
100791728 202540 95469188 1% /xen
/dev/mapper/VolGroup00-photo00
251981556 191716 238989840 1% /share/photos
/dev/mapper/VolGroup00-dmsdoc00
100791728 192256 95479472 1% /share/alfresco
none 1846656 104 1846552 1% /var/lib/xenstored



***smb.conf
[global]
workgroup = workgroup
netbios name = server
security = user
name resolve order = wins hosts lmhosts bcast
encrypt passwords = yes
hosts allow = 192.168.0.
hosts deny = 192.168.122.
interfaces = eth0
passdb backend = tdbsam
oslevel = 222
local master = yes
domain master = yes
preferred master = yes
cups options = raw
username map = /etc/samba/smbusers
wins support = yes
log level = 4
guest ok = yes

[photo]
comment = Photos
path = /share/photos
read only = yes
guest ok = yes
 
Old 01-23-2010, 08:38 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
You don't mention what version of XP and Vista. Are they the home version?
If so, that is most likely the problem.
 
Old 01-23-2010, 09:23 PM   #3
kphannan
LQ Newbie
 
Registered: Jan 2010
Location: Atlanta
Distribution: CentOS Intel 64, Red Hat, Mandrake
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry forgot that part.
XP is Pro SP4
Vista is Home.

Also as a new note.... I disabled the firewall and can get through now. What rules do I need then to get Samba working? I vaguely remember doing this about 11 years ago. Now if I can only dust off the system which is sitting in my basement with the server running samba, Apache and a router..... Now if I can only remember the root password....
 
Old 01-23-2010, 09:26 PM   #4
kphannan
LQ Newbie
 
Registered: Jan 2010
Location: Atlanta
Distribution: CentOS Intel 64, Red Hat, Mandrake
Posts: 4

Original Poster
Rep: Reputation: 0
Somewhat on topic. I have noticed errors in the XP pro systems log indicating an error when the CentOS server attempts to become the browse master for the workgroup.

--- names changed to protect the innocent ----
The master browser has received a server announcement from the computer SERVER that believes that it is the master browser for the domain on transport NetBT_Tcpip_{AAAABBBB-EEEE-EEEE-. The master browser is stopping or an election is being forced.
 
Old 01-24-2010, 08:01 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Re firewall settings : http://troy.jdmz.net/samba/fw/
 
Old 01-26-2010, 09:08 AM   #6
kphannan
LQ Newbie
 
Registered: Jan 2010
Location: Atlanta
Distribution: CentOS Intel 64, Red Hat, Mandrake
Posts: 4

Original Poster
Rep: Reputation: 0
Here is an update...
I disabled the firewall and everything started to work. It turns out I added the firewall rules in iptables after the -DENY rule. Once I moved the Samba rules before the DENY rule, everything worked fine. Silly mistake on my part. I know better than that. Thanks for the help.
 
  


Reply

Tags
centos54, samba, selinux


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
unable to mount windows share when i try to access files vinaytp Linux - Newbie 5 04-27-2009 11:35 PM
how to make Vista access samba share bfzhou Linux - Newbie 3 11-26-2008 01:32 PM
Samba Share problem with Windows Vista Rustylinux Mandriva 0 08-24-2007 03:27 PM
Access linux SAMBA share from windows pengu Linux - Software 6 02-17-2007 11:55 AM
unable to browse samba share from windows 2003 kfloda Linux - Software 1 08-16-2003 07:14 AM


All times are GMT -5. The time now is 02:20 AM.

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