1secadm_selinux(8) secadm SELinux Policy documentation secadm_selinux(8)
2
3
4
6 secadm_r - Security administrator role - Security Enhanced Linux Policy
7
8
10 SELinux supports Roles Based Access Control (RBAC), some Linux roles
11 are login roles, while other roles need to be transition into.
12
13 Note: Examples in this man page will use the staff_u SELinux user.
14
15 Non login roles are usually used for administrative tasks. For example,
16 tasks that require root privileges. Roles control which types a user
17 can run processes with. Roles often have default types assigned to
18 them.
19
20 The default type for the secadm_r role is secadm_t.
21
22 The newrole program to transition directly to this role.
23
24 newrole -r secadm_r -t secadm_t
25
26 sudo is the preferred method to do transition from one role to another.
27 You setup sudo to transition to secadm_r by adding a similar line to
28 the /etc/sudoers file.
29
30 USERNAME ALL=(ALL) ROLE=secadm_r TYPE=secadm_t COMMAND
31
32 sudo will run COMMAND as staff_u:secadm_r:secadm_t:LEVEL
33
34 When using a non login role, you need to setup SELinux so that your
35 SELinux user can reach secadm_r role.
36
37 Execute the following to see all of the assigned SELinux roles:
38
39 semanage user -l
40
41 You need to add secadm_r to the staff_u user. You could setup the
42 staff_u user to be able to use the secadm_r role with a command like:
43
44 $ semanage user -m -R 'staff_r system_r secadm_r' staff_u
45
46
47
48 SELinux policy also controls which roles can transition to a different
49 role. You can list these rules using the following command.
50
51 search --role_allow
52
53 SELinux policy allows the sysadm_r, staff_r, auditadm_r roles can tran‐
54 sition to the secadm_r role.
55
56
57
59 SELinux policy is customizable based on least access required. secadm
60 policy is extremely flexible and has several booleans that allow you to
61 manipulate the policy and run secadm with the tightest access possible.
62
63
64
65 If you want to allow users to resolve user passwd entries directly from
66 ldap rather then using a sssd server, you must turn on the authlo‐
67 gin_nsswitch_use_ldap boolean. Disabled by default.
68
69 setsebool -P authlogin_nsswitch_use_ldap 1
70
71
72
73 If you want to deny user domains applications to map a memory region as
74 both executable and writable, this is dangerous and the executable
75 should be reported in bugzilla, you must turn on the deny_execmem bool‐
76 ean. Enabled by default.
77
78 setsebool -P deny_execmem 1
79
80
81
82 If you want to deny any process from ptracing or debugging any other
83 processes, you must turn on the deny_ptrace boolean. Enabled by
84 default.
85
86 setsebool -P deny_ptrace 1
87
88
89
90 If you want to allow all domains to execute in fips_mode, you must turn
91 on the fips_mode boolean. Enabled by default.
92
93 setsebool -P fips_mode 1
94
95
96
97 If you want to allow confined applications to run with kerberos, you
98 must turn on the kerberos_enabled boolean. Disabled by default.
99
100 setsebool -P kerberos_enabled 1
101
102
103
104 If you want to allow system to run with NIS, you must turn on the
105 nis_enabled boolean. Disabled by default.
106
107 setsebool -P nis_enabled 1
108
109
110
111 If you want to allow confined applications to use nscd shared memory,
112 you must turn on the nscd_use_shm boolean. Disabled by default.
113
114 setsebool -P nscd_use_shm 1
115
116
117
118 If you want to allow unconfined executables to make their stack exe‐
119 cutable. This should never, ever be necessary. Probably indicates a
120 badly coded executable, but could indicate an attack. This executable
121 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
122 stack boolean. Disabled by default.
123
124 setsebool -P selinuxuser_execstack 1
125
126
127
129 The SELinux process type secadm_t can manage files labeled with the
130 following file types. The paths listed are the default paths for these
131 file types. Note the processes UID still need to have DAC permissions.
132
133 boolean_type
134
135
136 default_context_t
137
138 /etc/selinux/([^/]*/)?contexts(/.*)?
139 /root/.default_contexts
140
141 dosfs_t
142
143
144 etc_runtime_t
145
146 /[^/]+
147 /etc/mtab.*
148 /etc/blkid(/.*)?
149 /etc/nologin.*
150 /etc/.fstab.hal..+
151 /halt
152 /fastboot
153 /poweroff
154 /.autofsck
155 /etc/cmtab
156 /forcefsck
157 /.suspended
158 /fsckoptions
159 /.autorelabel
160 /etc/.updated
161 /var/.updated
162 /etc/killpower
163 /etc/nohotplug
164 /etc/securetty
165 /etc/ioctl.save
166 /etc/fstab.REVOKE
167 /etc/network/ifstate
168 /etc/sysconfig/hwconf
169 /etc/ptal/ptal-printd-like
170 /etc/xorg.conf.d/00-system-setup-keyboard.conf
171 /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf
172
173 file_context_t
174
175 /etc/selinux/([^/]*/)?contexts/files(/.*)?
176
177 screen_home_t
178
179 /root/.screen(/.*)?
180 /home/[^/]+/.screen(/.*)?
181 /home/[^/]+/.screenrc
182 /home/[^/]+/.tmux.conf
183
184 security_t
185
186 /selinux
187
188 selinux_config_t
189
190 /etc/selinux(/.*)?
191 /etc/selinux/([^/]*/)?seusers
192 /etc/selinux/([^/]*/)?users(/.*)?
193 /etc/selinux/([^/]*/)?setrans.conf
194 /var/lib/sepolgen(/.*)?
195
196 selinux_login_config_t
197
198 /etc/selinux/([^/]*/)?logins(/.*)?
199
200 semanage_store_t
201
202 /etc/selinux/([^/]*/)?policy(/.*)?
203 /etc/selinux/(minimum|mls|targeted)/active(/.*)?
204 /etc/selinux/([^/]*/)?modules/(active|tmp|previous)(/.*)?
205 /var/lib/selinux(/.*)?
206 /etc/share/selinux/mls(/.*)?
207 /etc/share/selinux/targeted(/.*)?
208
209 systemd_passwd_var_run_t
210
211 /var/run/systemd/ask-password(/.*)?
212 /var/run/systemd/ask-password-block(/.*)?
213
214 user_tmp_type
215
216 all user tmp files
217
218
220 semanage fcontext can also be used to manipulate default file context
221 mappings.
222
223 semanage permissive can also be used to manipulate whether or not a
224 process type is permissive.
225
226 semanage module can also be used to enable/disable/install/remove pol‐
227 icy modules.
228
229 semanage boolean can also be used to manipulate the booleans
230
231
232 system-config-selinux is a GUI tool available to customize SELinux pol‐
233 icy settings.
234
235
237 This manual page was auto-generated using sepolicy manpage .
238
239
241 selinux(8), secadm(8), semanage(8), restorecon(8), chcon(1), sepol‐
242 icy(8), setsebool(8), secadm_screen_selinux(8),
243 secadm_screen_selinux(8), secadm_su_selinux(8), secadm_su_selinux(8),
244 secadm_sudo_selinux(8), secadm_sudo_selinux(8)
245
246
247
248mgrepl@redhat.com secadm secadm_selinux(8)