Content-type: text/html Manpage of staff_selinux

staff_selinux

Section: staff SELinux Policy documentation (8)
Updated: staff
Index Return to Main Contents
 

NAME

staff_u - Administrator's unprivileged user - Security Enhanced Linux Policy

 

DESCRIPTION

staff_u is an SELinux User defined in the SELinux policy. SELinux users have default roles, staff_r. The default role has a default type, staff_t, associated with it.

The SELinux user will usually login to a system with a context that looks like:

staff_u:staff_r:staff_t:s0-s0:c0.c1023

Linux users are automatically assigned an SELinux users at login. Login programs use the SELinux User to assign initial context to the user's shell.

SELinux policy uses the context to control the user's access.

By default all users are assigned to the SELinux user via the __default__ flag

On Targeted policy systems the __default__ user is assigned to the unconfined_u SELinux user.

You can list all Linux User to SELinux user mapping using:

semanage login -l

If you wanted to change the default user mapping to use the staff_u user, you would execute:

semanage login -m -s staff_u __default__

If you want to map the one Linux user (joe) to the SELinux user staff, you would execute:

$ semanage login -a -s staff_u joe

 

USER DESCRIPTION

The SELinux user staff_u is defined in policy as a unprivileged user. SELinux prevents unprivileged users from doing administration tasks without transitioning to a different role.

 

SUDO

The SELinux user staff can execute sudo.

You can set up sudo to allow staff to transition to an administrative domain:

Add one or more of the following record to sudoers using visudo.

USERNAME ALL=(ALL) ROLE=auditadm_r TYPE=auditadm_t COMMAND
sudo will run COMMAND as staff_u:auditadm_r:auditadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=dbadm_r TYPE=dbadm_t COMMAND
sudo will run COMMAND as staff_u:dbadm_r:dbadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=logadm_r TYPE=logadm_t COMMAND
sudo will run COMMAND as staff_u:logadm_r:logadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=secadm_r TYPE=secadm_t COMMAND
sudo will run COMMAND as staff_u:secadm_r:secadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=sysadm_r TYPE=sysadm_t COMMAND
sudo will run COMMAND as staff_u:sysadm_r:sysadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=unconfined_r TYPE=unconfined_t COMMAND
sudo will run COMMAND as staff_u:unconfined_r:unconfined_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

USERNAME ALL=(ALL) ROLE=webadm_r TYPE=webadm_t COMMAND
sudo will run COMMAND as staff_u:webadm_r:webadm_t:LEVEL

You might also need to add one or more of these new roles to your SELinux user record.

List the SELinux roles your SELinux user can reach by executing:

$ semanage user -l |grep selinux_name

Modify the roles list and add staff_r to this list.

$ semanage user -m -R 'staff_r auditadm_r dbadm_r logadm_r secadm_r sysadm_r unconfined_r webadm_r' staff_u

For more details you can see semanage man page.

The SELinux type staff_t is not allowed to execute sudo.

 

X WINDOWS LOGIN

The SELinux user staff_u is able to X Windows login.

 

NETWORK

The SELinux user staff_u is able to listen on the following tcp ports.

xserver_port_t: 6000-6020

The SELinux user staff_u is able to connect to the following tcp ports.

all ports

The SELinux user staff_u is able to listen on the following udp ports.

ephemeral_port_t: 32768-61000

all ports with out defined types

The SELinux user staff_u is able to connect to the following tcp ports.

all ports

 

BOOLEANS

SELinux policy is customizable based on least access required. staff policy is extremely flexible and has several booleans that allow you to manipulate the policy and run staff with the tightest access possible.

If you want to allow staff user to create and transition to svirt domains, you must turn on the staff_use_svirt boolean.

setsebool -P staff_use_svirt 1

 

HOME_EXEC

The SELinux user staff_u is able execute home content files.

 

TRANSITIONS

Three things can happen when staff_t attempts to execute a program.

1. SELinux Policy can deny staff_t from executing the program.

2. SELinux Policy can allow staff_t to execute the program in the current user type.

Execute the following to see the types that the SELinux user staff_t can execute without transitioning:

sesearch -A -s staff_t -c file -p execute_no_trans

3. SELinux can allow staff_t to execute the program and transition to a new type.

Execute the following to see the types that the SELinux user staff_t can execute and transition:

$ sesearch -A -s staff_t -c process -p transition

 

MANAGED FILES

The SELinux user type staff_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.


anon_inodefs_t


auth_cache_t

        /var/cache/coolkey(/.*)?


bluetooth_helper_tmp_t


bluetooth_helper_tmpfs_t


cgroup_t

        /cgroup

       /sys/fs/cgroup


chrome_sandbox_tmpfs_t


games_data_t

        /var/games(/.*)?

       /var/lib/games(/.*)?


gpg_agent_tmp_t

        /home/[^/]*/.gnupg/log-socket


httpd_user_content_t

        /home/[^/]*/((www)|(web)|(public_html))(/.+)?


httpd_user_htaccess_t

        /home/[^/]*/((www)|(web)|(public_html))(/.*)?/.htaccess


httpd_user_ra_content_t

        /home/[^/]*/((www)|(web)|(public_html))(/.*)?/logs(/.*)?


httpd_user_rw_content_t


httpd_user_script_exec_t

        /home/[^/]*/((www)|(web)|(public_html))/cgi-bin(/.+)?


iceauth_home_t

        /root/.DCOP.*

       /root/.ICEauthority.*

       /home/[^/]*/.DCOP.


 

Index

NAME
DESCRIPTION
USER DESCRIPTION
SUDO
X WINDOWS LOGIN
NETWORK
BOOLEANS
HOME_EXEC
TRANSITIONS
MANAGED FILES

This document was created by man2html, using the manual pages.
Time: 19:35:23 GMT, September 30, 2012