LinuxQuestions.org
Visit Jeremy's Blog.
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 06-08-2009, 01:10 PM   #1
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Rep: Reputation: 32
How to allow Samba server from Selinux firewall in CentOS


Hello,

I'm using CentOS 5.3, and I want to allow my samba server from selinux. I disabled my selinux and it works fine, but I want to keep my seline firewall on and want to allow other workstation to access my samba server.


Does any buddy have idea ?
 
Old 06-08-2009, 01:13 PM   #2
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
I am not really sure what you are asking. Samba runs on 139 and 445 if you are asking for the ports to allow?
 
Old 06-08-2009, 01:53 PM   #3
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
No, I am trying to say how to allow samba from SElinux, because when I disable SElinux I can share my data on the network. But for some reason when I enable SELinux, I can't access to my share folder. So what I want to do is to allow Samba from SElinux,so I don't have to turn off SElinux.
 
Old 06-08-2009, 01:58 PM   #4
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
sorry, I don't really use selinux
 
Old 06-08-2009, 02:00 PM   #5
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
rahilmaknojia,
I think the confusion here is what you are describing. I think I understand you. Correct me if I am wrong.

You have a network of machines with Samba shares. 1 of those machines is SELINUX. Everything works fine as long as SELINUX is turned off. However if that machine is on, none of your samba shares work.

Am I correct?
 
Old 06-08-2009, 02:09 PM   #6
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Yes, you are right and I want to use Samba to share on the network with SElinux "ON"

Do you have any idea ?
 
Old 06-09-2009, 02:09 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,166

Rep: Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680
semanage fcontext -l |grep samba
getsebool -a | grep samba

Eg to enable logons to home dirs

setsebool -P samba_enable_home_dirs on
 
Old 06-09-2009, 10:53 AM   #8
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Thanks Chrism01, you rock it works
 
Old 06-09-2009, 10:57 AM   #9
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Anyways, what is the use of this command "semanage fcontext -l |grep samba"
 
  


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
system-config-selinux missing in Centos 5.3? lovemov Linux - Software 11 12-05-2017 04:44 AM
SELinux & vBulletin (CentOS 5.2) sxa Linux - Security 1 02-04-2009 09:58 PM
Centos samba server authenticating with windows LDAP server GuodMan Linux - Server 4 10-03-2008 01:56 AM
SELinux - disabling in CentOS 5.1 prevents LVM from loading and/or booting tiber Linux - Software 2 02-09-2008 04:51 AM
ADSL firewall/gateway/samba server hazza96 Linux - Distributions 2 06-26-2001 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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