HI All<br>I have to configure the Role-based access control (RBAC) for smbldap user.<br>How should i set the roles for users and which policy i should use?<br><br>Now i am using MLS Policy for configure the RBAC. <br>I am not sure this the correct way for configure the RBAC on CentOS 5.1.<br>
<br>Please help me what i am going wrong.<br><br>Thanks,<br>Prakash,<br><br> <br><br><br><br><br><div class="gmail_quote">On Wed, Jun 11, 2008 at 8:38 PM, Stephen Smalley <<a href="mailto:sds@tycho.nsa.gov">sds@tycho.nsa.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
On Wed, 2008-06-11 at 20:32 +0530, prakash hallalli wrote:<br>
> HI ALL<br>
> I have configured SELinux on ContOS 5.1. I have configured the RBAC<br>
> using MLS (Multilevel Security) Policy using enforcing mode. I am<br>
> trying to restart the system services and they are not restarting and<br>
> it is throwing some error message.<br>
><br>
> Steps to reproduce:<br>
><br>
> 1 ) MLS Policy configuration.<br>
><br>
> 1. Install selinux-policy-mls<br>
> 2. Set SELINUXTYPE=MLS in /etc/selinux/config file<br>
> 3. touch ./autorelabel; on root's home directory, and reboot the<br>
> machine.<br>
<br>
</div>As others noted, this should have been touch /.autorelabel, not<br>
touch ./autorelabel on root's home directory.  But I don't think that is<br>
relevant any more - you already manually relabeled.<br>
<div><div></div><div class="Wj3C7c"><br>
> 4. While machine is rebooting, change the GRUB parameter.<br>
> enforcing=0<br>
><br>
> 2) Now system is in permissive mode and SELinux status is as follows.<br>
><br>
> [root@turtle11 ~]# sestatus<br>
> SELinux status:                  enabled<br>
> SELinuxfs mount:                /selinux<br>
> Current mode:                      permissive<br>
> Mode from config file:          enforcing<br>
> Policy version:                    21<br>
> Policy from config file:         mls<br>
><br>
> 3) Restart the system services and they restart successfully.<br>
><br>
> [root@turtle11 ~]# service nfs restart<br>
> Shutting down NFS mountd:                                  [  OK  ]<br>
> Shutting down NFS daemon:                                  [  OK  ]<br>
> Shutting down NFS quotas:                                  [  OK  ]<br>
> Shutting down NFS services:                                [  OK  ]<br>
> Starting NFS services:                                         [<br>
> OK  ]<br>
> Starting NFS quotas:                                           [<br>
> OK  ]<br>
> Starting NFS daemon:                                         [  OK  ]<br>
> Starting NFS mountd:                                         [  OK  ]<br>
><br>
> 3) Now i am setting enforcing mode using setenforce command.<br>
><br>
> root@turtle11 ~]#setenforce 1<br>
> root@turtle11 ~]# sestatus<br>
> SELinux status:             enabled<br>
> SELinuxfs mount:          /selinux<br>
> Current mode:               enforcing<br>
> Mode from config file:    enforcing<br>
> Policy version:              21<br>
> Policy from config file:   mls<br>
><br>
> 4) a) Now system is in enforcing mode and i am trying to restart the<br>
> system service. The restart will result in error message.<br>
><br>
> [root@turtle11 ~]# service nfs restart<br>
> nfs: unrecognized service<br>
><br>
> [root@turtle11 ~]# run_init /etc/init.d/nfs restart<br>
> Authenticating root.<br>
> Password: XXXXXX<br>
> run_init: incorrect password for root<br>
> authentication failed.<br>
> [root@turtle11 ~]#<br>
><br>
> [root@turtle11 ~]# run_init /etc/init.d/ldap restart<br>
> Authenticating root.<br>
> Password: XXXXXX<br>
> run_init: incorrect password for root<br>
> authentication failed.<br>
<br>
</div></div>This implies that the existing policy isn't allowing these domains to do<br>
what they need to perform the authentication.  Elsewhere you said you<br>
are using ldap, so they may need additional permissions for the network<br>
lookup.<br>
<div class="Ih2E3d"><br>
> 5) I am using sysadm_r<br>
><br>
> [root@turtle11 ~]# id<br>
> uid=0(root) gid=0(root)<br>
> groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)<br>
> context=root:sysadm_r:sysadm_t:SystemLow-SystemHigh<br>
> [root@turtle11 ~]#<br>
><br>
> 6) This is i am getting /sbin/ausearch log messages.<br>
><br>
> [root@turtle11 ~]#/sbin/ausearch -i -m AVC -sv no<br>
> type=SYSCALL msg=audit(06/11/2008 20:01:29.285:130367) : arch=x86_64<br>
> syscall=recvfrom success=no exit=-13(Permission denied) a0=5<br>
> a1=7fff60825b40 a2=5dc a3=0 items=0 ppid=1 pid=3103 auid=root uid=root<br>
> gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root<br>
> tty=(none) comm=dhcpd exe=/usr/sbin/dhcpd<br>
> subj=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 key=(null)<br>
> type=AVC msg=audit(06/11/2008 20:01:29.285:130367) : avc:  denied<br>
> { read } for  pid=3103 comm=dhcpd lport=1<br>
> scontext=root:sysadm_r:sysadm_t:s0-s15:c0.c1023<br>
> tcontext=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 tclass=rawip_socket<br>
<br>
</div>On this one, as I said, dhcpd shouldn't be running in sysadm_t.<br>
How did you start it?<br>
<font color="#888888"><br>
--<br>
Stephen Smalley<br>
National Security Agency<br>
<br>
</font></blockquote></div><br>