1sysadm_selinux(8) sysadm SELinux Policy documentation sysadm_selinux(8)
2
3
4
6 sysadm_u - General system administration role - Security Enhanced Linux
7 Policy
8
9
11 sysadm_u is an SELinux User defined in the SELinux policy. SELinux
12 users have default roles, sysadm_r. The default role has a default
13 type, sysadm_t, associated with it.
14
15 The SELinux user will usually login to a system with a context that
16 looks like:
17
18 sysadm_u:sysadm_r:sysadm_t:s0 - s0:c0.c1023
19
20 Linux users are automatically assigned an SELinux users at login. Lo‐
21 gin programs use the SELinux User to assign initial context to the
22 user's shell.
23
24 SELinux policy uses the context to control the user's access.
25
26 By default all users are assigned to the SELinux user via the __de‐
27 fault__ flag
28
29 On Targeted policy systems the __default__ user is assigned to the un‐
30 confined_u SELinux user.
31
32 You can list all Linux User to SELinux user mapping using:
33
34 semanage login -l
35
36 If you wanted to change the default user mapping to use the sysadm_u
37 user, you would execute:
38
39 semanage login -m -s sysadm_u __default__
40
41
42 If you want to map the one Linux user (joe) to the SELinux user sysadm,
43 you would execute:
44
45 $ semanage login -a -s sysadm_u joe
46
47
48
50 The SELinux user sysadm_u is an admin user. It means that a mapped
51 Linux user to this SELinux user is intended for administrative actions.
52 Usually this is assigned to a root Linux user.
53
54
56 The SELinux user sysadm can execute sudo.
57
58 You can set up sudo to allow sysadm to transition to an administrative
59 domain:
60
61 Add one or more of the following record to sudoers using visudo.
62
63
64 USERNAME ALL=(ALL) ROLE=user_r TYPE=user_t COMMAND
65 sudo will run COMMAND as sysadm_u:user_r:user_t:LEVEL
66
67 You might also need to add one or more of these new roles to your
68 SELinux user record.
69
70 List the SELinux roles your SELinux user can reach by executing:
71
72 $ semanage user -l |grep selinux_name
73
74 Modify the roles list and add sysadm_r to this list.
75
76 $ semanage user -m -R 'sysadm_r user_r staff_r secadm_r auditadm_r'
77 sysadm_u
78
79 For more details you can see semanage man page.
80
81
82 USERNAME ALL=(ALL) ROLE=staff_r TYPE=staff_t COMMAND
83 sudo will run COMMAND as sysadm_u:staff_r:staff_t:LEVEL
84
85 You might also need to add one or more of these new roles to your
86 SELinux user record.
87
88 List the SELinux roles your SELinux user can reach by executing:
89
90 $ semanage user -l |grep selinux_name
91
92 Modify the roles list and add sysadm_r to this list.
93
94 $ semanage user -m -R 'sysadm_r user_r staff_r secadm_r auditadm_r'
95 sysadm_u
96
97 For more details you can see semanage man page.
98
99
100 USERNAME ALL=(ALL) ROLE=secadm_r TYPE=secadm_t COMMAND
101 sudo will run COMMAND as sysadm_u:secadm_r:secadm_t:LEVEL
102
103 You might also need to add one or more of these new roles to your
104 SELinux user record.
105
106 List the SELinux roles your SELinux user can reach by executing:
107
108 $ semanage user -l |grep selinux_name
109
110 Modify the roles list and add sysadm_r to this list.
111
112 $ semanage user -m -R 'sysadm_r user_r staff_r secadm_r auditadm_r'
113 sysadm_u
114
115 For more details you can see semanage man page.
116
117
118 USERNAME ALL=(ALL) ROLE=auditadm_r TYPE=auditadm_t COMMAND
119 sudo will run COMMAND as sysadm_u:auditadm_r:auditadm_t:LEVEL
120
121 You might also need to add one or more of these new roles to your
122 SELinux user record.
123
124 List the SELinux roles your SELinux user can reach by executing:
125
126 $ semanage user -l |grep selinux_name
127
128 Modify the roles list and add sysadm_r to this list.
129
130 $ semanage user -m -R 'sysadm_r user_r staff_r secadm_r auditadm_r'
131 sysadm_u
132
133 For more details you can see semanage man page.
134
135
136 The SELinux type sysadm_t is not allowed to execute sudo.
137
138
140 The SELinux user sysadm_u is able to X Windows login.
141
142
144 The SELinux user sysadm_u is able to listen on the following tcp ports.
145
146 all ports >= 512 and < 1024
147
148 1716
149
150 all ports without defined types
151
152 32768-60999
153
154 all ports >= 1024
155
156
157 The SELinux user sysadm_u is able to connect to the following tcp
158 ports.
159
160 all ports
161
162 8955
163
164 53,853
165
166 389,636,3268,3269,7389
167
168 all ports without defined types
169
170 32768-60999
171
172 all ports < 1024
173
174 9080
175
176 88,750,4444
177
178
179 The SELinux user sysadm_u is able to listen on the following udp ports.
180
181 32768-60999
182
183 all ports without defined types
184
185 123
186
187 all ports >= 1024
188
189
190 The SELinux user sysadm_u is able to connect to the following tcp
191 ports.
192
193 all ports
194
195 8955
196
197 53,853
198
199 389,636,3268,3269,7389
200
201 all ports without defined types
202
203 32768-60999
204
205 all ports < 1024
206
207 9080
208
209 88,750,4444
210
211
213 SELinux policy is customizable based on least access required. sysadm
214 policy is extremely flexible and has several booleans that allow you to
215 manipulate the policy and run sysadm with the tightest access possible.
216
217
218
219 If you want to determine whether crond can execute jobs in the user do‐
220 main as opposed to the the generic cronjob domain, you must turn on the
221 cron_userdomain_transition boolean. Enabled by default.
222
223 setsebool -P cron_userdomain_transition 1
224
225
226
227 If you want to deny all system processes and Linux users to use blue‐
228 tooth wireless technology, you must turn on the deny_bluetooth boolean.
229 Enabled by default.
230
231 setsebool -P deny_bluetooth 1
232
233
234
235 If you want to deny user domains applications to map a memory region as
236 both executable and writable, this is dangerous and the executable
237 should be reported in bugzilla, you must turn on the deny_execmem bool‐
238 ean. Enabled by default.
239
240 setsebool -P deny_execmem 1
241
242
243
244 If you want to deny any process from ptracing or debugging any other
245 processes, you must turn on the deny_ptrace boolean. Enabled by de‐
246 fault.
247
248 setsebool -P deny_ptrace 1
249
250
251
252 If you want to allow all domains to execute in fips_mode, you must turn
253 on the fips_mode boolean. Enabled by default.
254
255 setsebool -P fips_mode 1
256
257
258
259 If you want to determine whether calling user domains can execute Git
260 daemon in the git_session_t domain, you must turn on the git_ses‐
261 sion_users boolean. Disabled by default.
262
263 setsebool -P git_session_users 1
264
265
266
267 If you want to determine whether calling user domains can execute
268 Polipo daemon in the polipo_session_t domain, you must turn on the
269 polipo_session_users boolean. Disabled by default.
270
271 setsebool -P polipo_session_users 1
272
273
274
275 If you want to disable kernel module loading, you must turn on the se‐
276 cure_mode_insmod boolean. Enabled by default.
277
278 setsebool -P secure_mode_insmod 1
279
280
281
282 If you want to allow unconfined executables to make their stack exe‐
283 cutable. This should never, ever be necessary. Probably indicates a
284 badly coded executable, but could indicate an attack. This executable
285 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
286 stack boolean. Enabled by default.
287
288 setsebool -P selinuxuser_execstack 1
289
290
291
292 If you want to allow user to r/w files on filesystems that do not have
293 extended attributes (FAT, CDROM, FLOPPY), you must turn on the selin‐
294 uxuser_rw_noexattrfile boolean. Enabled by default.
295
296 setsebool -P selinuxuser_rw_noexattrfile 1
297
298
299
300 If you want to allow users to run TCP servers (bind to ports and accept
301 connection from the same domain and outside users) disabling this
302 forces FTP passive mode and may change other protocols, you must turn
303 on the selinuxuser_tcp_server boolean. Disabled by default.
304
305 setsebool -P selinuxuser_tcp_server 1
306
307
308
309 If you want to allow users to run UDP servers (bind to ports and accept
310 connection from the same domain and outside users) disabling this may
311 break avahi discovering services on the network and other udp related
312 services, you must turn on the selinuxuser_udp_server boolean. Disabled
313 by default.
314
315 setsebool -P selinuxuser_udp_server 1
316
317
318
320 The SELinux user sysadm_u is able execute home content files.
321
322
324 Three things can happen when sysadm_t attempts to execute a program.
325
326 1. SELinux Policy can deny sysadm_t from executing the program.
327
328
329
330 2. SELinux Policy can allow sysadm_t to execute the program in the cur‐
331 rent user type.
332
333 Execute the following to see the types that the SELinux user
334 sysadm_t can execute without transitioning:
335
336 sesearch -A -s sysadm_t -c file -p execute_no_trans
337
338
339
340 3. SELinux can allow sysadm_t to execute the program and transition to
341 a new type.
342
343 Execute the following to see the types that the SELinux user
344 sysadm_t can execute and transition:
345
346 $ sesearch -A -s sysadm_t -c process -p transition
347
348
349
351 The SELinux process type sysadm_t can manage files labeled with the
352 following file types. The paths listed are the default paths for these
353 file types. Note the processes UID still need to have DAC permissions.
354
355 file_type
356
357 all files on the system
358
359
361 semanage fcontext can also be used to manipulate default file context
362 mappings.
363
364 semanage permissive can also be used to manipulate whether or not a
365 process type is permissive.
366
367 semanage module can also be used to enable/disable/install/remove pol‐
368 icy modules.
369
370 semanage boolean can also be used to manipulate the booleans
371
372
373 system-config-selinux is a GUI tool available to customize SELinux pol‐
374 icy settings.
375
376
378 This manual page was auto-generated using sepolicy manpage .
379
380
382 selinux(8), sysadm(8), semanage(8), restorecon(8), chcon(1), sepol‐
383 icy(8), setsebool(8), sysadm_dbusd_selinux(8), sysadm_dbusd_selinux(8),
384 sysadm_gkeyringd_selinux(8), sysadm_gkeyringd_selinux(8),
385 sysadm_passwd_selinux(8), sysadm_passwd_selinux(8),
386 sysadm_screen_selinux(8), sysadm_screen_selinux(8), sysadm_seun‐
387 share_selinux(8), sysadm_seunshare_selinux(8),
388 sysadm_ssh_agent_selinux(8), sysadm_ssh_agent_selinux(8),
389 sysadm_su_selinux(8), sysadm_su_selinux(8), sysadm_sudo_selinux(8),
390 sysadm_sudo_selinux(8)
391
392
393
394mgrepl@redhat.com sysadm sysadm_selinux(8)