1useradd_selinux(8) SELinux Policy useradd useradd_selinux(8)
2
3
4
6 useradd_selinux - Security Enhanced Linux Policy for the useradd pro‐
7 cesses
8
10 Security-Enhanced Linux secures the useradd processes via flexible
11 mandatory access control.
12
13 The useradd processes execute with the useradd_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep useradd_t
20
21
22
24 The useradd_t SELinux type can be entered via the file_type, unla‐
25 beled_t, proc_type, user_home_t, filesystem_type, useradd_exec_t,
26 mtrr_device_t, sysctl_type file types.
27
28 The default entrypoint paths for the useradd_t domain are the follow‐
29 ing:
30
31 all files on the system, /home/[^/]*/.+, /home/staff/.+,
32 /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /dev/cpu/mtrr
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 useradd policy is very flexible allowing users to setup their useradd
42 processes in as secure a method as possible.
43
44 The following process types are defined for useradd:
45
46 useradd_t
47
48 Note: semanage permissive -a useradd_t can be used to make the process
49 type useradd_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. useradd
56 policy is extremely flexible and has several booleans that allow you to
57 manipulate the policy and run useradd with the tightest access possi‐
58 ble.
59
60
61
62 If you want to allow all daemons the ability to read/write terminals,
63 you must turn on the allow_daemons_use_tty boolean. Disabled by
64 default.
65
66 setsebool -P allow_daemons_use_tty 1
67
68
69
70 If you want to allow all domains to use other domains file descriptors,
71 you must turn on the allow_domain_fd_use boolean. Enabled by default.
72
73 setsebool -P allow_domain_fd_use 1
74
75
76
77 If you want to allow unconfined executables to make their heap memory
78 executable. Doing this is a really bad idea. Probably indicates a
79 badly coded executable, but could indicate an attack. This executable
80 should be reported in bugzilla, you must turn on the allow_execheap
81 boolean. Disabled by default.
82
83 setsebool -P allow_execheap 1
84
85
86
87 If you want to allow unconfined executables to map a memory region as
88 both executable and writable, this is dangerous and the executable
89 should be reported in bugzilla), you must turn on the allow_execmem
90 boolean. Enabled by default.
91
92 setsebool -P allow_execmem 1
93
94
95
96 If you want to allow all unconfined executables to use libraries
97 requiring text relocation that are not labeled textrel_shlib_t), you
98 must turn on the allow_execmod boolean. Enabled by default.
99
100 setsebool -P allow_execmod 1
101
102
103
104 If you want to allow unconfined executables to make their stack exe‐
105 cutable. This should never, ever be necessary. Probably indicates a
106 badly coded executable, but could indicate an attack. This executable
107 should be reported in bugzilla), you must turn on the allow_execstack
108 boolean. Enabled by default.
109
110 setsebool -P allow_execstack 1
111
112
113
114 If you want to allow confined applications to run with kerberos, you
115 must turn on the allow_kerberos boolean. Enabled by default.
116
117 setsebool -P allow_kerberos 1
118
119
120
121 If you want to allow sysadm to debug or ptrace all processes, you must
122 turn on the allow_ptrace boolean. Disabled by default.
123
124 setsebool -P allow_ptrace 1
125
126
127
128 If you want to allow system to run with NIS, you must turn on the
129 allow_ypbind boolean. Disabled by default.
130
131 setsebool -P allow_ypbind 1
132
133
134
135 If you want to allow all domains to have the kernel load modules, you
136 must turn on the domain_kernel_load_modules boolean. Disabled by
137 default.
138
139 setsebool -P domain_kernel_load_modules 1
140
141
142
143 If you want to allow all domains to execute in fips_mode, you must turn
144 on the fips_mode boolean. Enabled by default.
145
146 setsebool -P fips_mode 1
147
148
149
150 If you want to enable reading of urandom for all domains, you must turn
151 on the global_ssp boolean. Disabled by default.
152
153 setsebool -P global_ssp 1
154
155
156
157 If you want to allow certain domains to map low memory in the kernel,
158 you must turn on the mmap_low_allowed boolean. Disabled by default.
159
160 setsebool -P mmap_low_allowed 1
161
162
163
164 If you want to allow confined applications to use nscd shared memory,
165 you must turn on the nscd_use_shm boolean. Enabled by default.
166
167 setsebool -P nscd_use_shm 1
168
169
170
171 If you want to allow samba to act as the domain controller, add users,
172 groups and change passwords, you must turn on the samba_domain_con‐
173 troller boolean. Disabled by default.
174
175 setsebool -P samba_domain_controller 1
176
177
178
179 If you want to boolean to determine whether the system permits loading
180 policy, setting enforcing mode, and changing boolean values. Set this
181 to true and you have to reboot to set it back, you must turn on the
182 secure_mode_policyload boolean. Disabled by default.
183
184 setsebool -P secure_mode_policyload 1
185
186
187
188 If you want to support NFS home directories, you must turn on the
189 use_nfs_home_dirs boolean. Disabled by default.
190
191 setsebool -P use_nfs_home_dirs 1
192
193
194
195 If you want to support SAMBA home directories, you must turn on the
196 use_samba_home_dirs boolean. Disabled by default.
197
198 setsebool -P use_samba_home_dirs 1
199
200
201
202 If you want to support X userspace object manager, you must turn on the
203 xserver_object_manager boolean. Disabled by default.
204
205 setsebool -P xserver_object_manager 1
206
207
208
210 The SELinux process type useradd_t can manage files labeled with the
211 following file types. The paths listed are the default paths for these
212 file types. Note the processes UID still need to have DAC permissions.
213
214 file_type
215
216 all files on the system
217
218
220 SELinux requires files to have an extended attribute to define the file
221 type.
222
223 You can see the context of a file using the -Z option to ls
224
225 Policy governs the access confined processes have to these files.
226 SELinux useradd policy is very flexible allowing users to setup their
227 useradd processes in as secure a method as possible.
228
229 The following file types are defined for useradd:
230
231
232
233 useradd_exec_t
234
235 - Set files with the useradd_exec_t type, if you want to transition an
236 executable to the useradd_t domain.
237
238
239 Paths:
240 /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod
241
242
243 Note: File context can be temporarily modified with the chcon command.
244 If you want to permanently change the file context you need to use the
245 semanage fcontext command. This will modify the SELinux labeling data‐
246 base. You will need to use restorecon to apply the labels.
247
248
250 semanage fcontext can also be used to manipulate default file context
251 mappings.
252
253 semanage permissive can also be used to manipulate whether or not a
254 process type is permissive.
255
256 semanage module can also be used to enable/disable/install/remove pol‐
257 icy modules.
258
259 semanage boolean can also be used to manipulate the booleans
260
261
262 system-config-selinux is a GUI tool available to customize SELinux pol‐
263 icy settings.
264
265
267 This manual page was auto-generated using sepolicy manpage .
268
269
271 selinux(8), useradd(8), semanage(8), restorecon(8), chcon(1) , setse‐
272 bool(8)
273
274
275
276useradd 15-06-03 useradd_selinux(8)