staff_selinux(8) - Linux man page
Name
staff_u - Administrator's unprivileged user - Security Enhanced LinuxPolicy
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__
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=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 logadm_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 logadm_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 logadm_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 logadm_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-6150
- 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.
-
all ports with out defined types
- The SELinux user staff_u is able to connect to the following tcp ports.
-
all ports
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:
search -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:
$ search -A -s staff_t -c process -p transition
Managed Files
The SELinux process 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(/.*)?
cgroup_t
/cgroup(/.*)?
chrome_sandbox_tmpfs_t
games_data_t
/var/games(/.*)?
/var/lib/games(/.*)?
gpg_agent_tmp_t
httpd_user_content_t
/home/[^/]*/((www)|(web)|(public_html))(/.+)?
httpd_user_htaccess_t
httpd_user_ra_content_t
httpd_user_rw_content_t
httpd_user_script_exec_t
iceauth_home_t
/home/[^/]*/.DCOP.*
/home/[^/]*/.ICEauthority.*
/home/[^/]*/.ICEauthority.*
initrc_tmp_t
kerneloops_tmp_t
mail_spool_t
/var/mail(/.*)?
/var/spool/imap(/.*)?
/var/spool/mail(/.*)?
mnt_t
/mnt(/[^/]*)
/mnt(/[^/]*)?
/rhev(/[^/]*)?
/media(/[^/]*)
/media(/[^/]*)?
/etc/rhgb(/.*)?
/media/.hal-.*
/net
/afs
/misc
/rhev
mqueue_spool_t
/var/spool/(client)?mqueue(/.*)?
nfsd_rw_t
noxattrfs
all files on file systems which do not support extended attributes
sandbox_file_t
sandbox_tmpfs_type
all sandbox content in tmpfs file systems
screen_home_t
/root/.screen(/.*)?
/home/[^/]*/.screen(/.*)?
/home/[^/]*/.screenrc
screen_var_run_t
/var/run/screen(/.*)?
security_t
tmp_t
/tmp
/usr/tmp
/var/tmp
/var/tmp/vi.recover
usbfs_t
user_fonts_cache_t
/home/[^/]*/.fonts/auto(/.*)?
/home/[^/]*/.fontconfig(/.*)?
/home/[^/]*/.fonts.cache-.*
user_fonts_t
/home/[^/]*/.fonts(/.*)?
user_home_type
all user home files
user_tmp_t
/tmp/gconfd-.*
user_tmpfs_t
/dev/shm/mono.*
/dev/shm/pulse-shm.*
xauth_home_t
/root/.Xauth.*
/root/.xauth.*
/root/.serverauth.*
/var/lib/pqsql/.xauth.*
/var/lib/pqsql/.Xauthority.*
/var/lib/nxserver/home/.xauth.*
/var/lib/nxserver/home/.Xauthority.*
/home/[^/]*/.xauth.*
/home/[^/]*/.Xauthority.*
/home/[^/]*/.serverauth.*
xdm_tmp_t
/tmp/.X11-unix(/.*)?
/tmp/.ICE-unix(/.*)?
/tmp/.X0-lock
xserver_tmpfs_t
Commands
semanage fcontext can also be used to manipulate default file context mappings.semanage permissive can also be used to manipulate whether or not a process type is permissive.
semanage module can also be used to enable/disable/install/remove policy modules.
system-config-selinux is a GUI tool available to customize SELinux policy settings.