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 user_home_t, user‐
25 add_exec_t file types.
26
27 The default entrypoint paths for the useradd_t domain are the follow‐
28 ing:
29
30 /home/[^/]+/.+, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/user‐
31 mod, /usr/sbin/newusers
32
34 SELinux defines process types (domains) for each process running on the
35 system
36
37 You can see the context of a process using the -Z option to ps
38
39 Policy governs the access confined processes have to files. SELinux
40 useradd policy is very flexible allowing users to setup their useradd
41 processes in as secure a method as possible.
42
43 The following process types are defined for useradd:
44
45 useradd_t
46
47 Note: semanage permissive -a useradd_t can be used to make the process
48 type useradd_t permissive. SELinux does not deny access to permissive
49 process types, but the AVC (SELinux denials) messages are still gener‐
50 ated.
51
52
54 SELinux policy is customizable based on least access required. useradd
55 policy is extremely flexible and has several booleans that allow you to
56 manipulate the policy and run useradd with the tightest access possi‐
57 ble.
58
59
60
61 If you want to allow all domains to execute in fips_mode, you must turn
62 on the fips_mode boolean. Enabled by default.
63
64 setsebool -P fips_mode 1
65
66
67
68 If you want to allow system to run with NIS, you must turn on the
69 nis_enabled boolean. Disabled by default.
70
71 setsebool -P nis_enabled 1
72
73
74
75 If you want to allow samba to act as the domain controller, add users,
76 groups and change passwords, you must turn on the samba_domain_con‐
77 troller boolean. Disabled by default.
78
79 setsebool -P samba_domain_controller 1
80
81
82
83 If you want to support NFS home directories, you must turn on the
84 use_nfs_home_dirs boolean. Disabled by default.
85
86 setsebool -P use_nfs_home_dirs 1
87
88
89
90 If you want to support SAMBA home directories, you must turn on the
91 use_samba_home_dirs boolean. Disabled by default.
92
93 setsebool -P use_samba_home_dirs 1
94
95
96
98 The SELinux process type useradd_t can manage files labeled with the
99 following file types. The paths listed are the default paths for these
100 file types. Note the processes UID still need to have DAC permissions.
101
102 cifs_t
103
104
105 default_context_t
106
107 /etc/selinux/([^/]*/)?contexts(/.*)?
108 /root/.default_contexts
109
110 faillog_t
111
112 /var/log/btmp.*
113 /var/log/faillog.*
114 /var/log/tallylog.*
115 /var/run/faillock(/.*)?
116
117 httpd_user_content_type
118
119
120 initrc_var_run_t
121
122 /var/run/utmp
123 /var/run/random-seed
124 /var/run/runlevel.dir
125 /var/run/setmixer_flag
126
127 krb5_host_rcache_t
128
129 /var/tmp/krb5_0.rcache2
130 /var/cache/krb5rcache(/.*)?
131 /var/tmp/nfs_0
132 /var/tmp/DNS_25
133 /var/tmp/host_0
134 /var/tmp/imap_0
135 /var/tmp/HTTP_23
136 /var/tmp/HTTP_48
137 /var/tmp/ldap_55
138 /var/tmp/ldap_487
139 /var/tmp/ldapmap1_0
140
141 krb5kdc_var_lib_t
142
143 /var/lib/kdcproxy(/.*)?
144
145 lastlog_t
146
147 /var/log/lastlog.*
148
149 mail_spool_t
150
151 /var/mail(/.*)?
152 /var/spool/imap(/.*)?
153 /var/spool/mail(/.*)?
154 /var/spool/smtpd(/.*)?
155
156 nfs_t
157
158
159 openshift_file_type
160
161
162 security_t
163
164 /selinux
165
166 selinux_login_config_t
167
168 /etc/selinux/([^/]*/)?logins(/.*)?
169
170 semanage_read_lock_t
171
172 /etc/selinux/([^/]*/)?modules/semanage.read.LOCK
173 /var/lib/selinux/[^/]+/semanage.read.LOCK
174
175 semanage_store_t
176
177 /etc/selinux/([^/]*/)?policy(/.*)?
178 /etc/selinux/(minimum|mls|targeted)/active(/.*)?
179 /etc/selinux/([^/]*/)?modules/(active|tmp|previous)(/.*)?
180 /var/lib/selinux(/.*)?
181 /etc/share/selinux/mls(/.*)?
182 /etc/share/selinux/targeted(/.*)?
183
184 semanage_tmp_t
185
186
187 semanage_trans_lock_t
188
189 /etc/selinux/([^/]*/)?modules/semanage.trans.LOCK
190 /var/lib/selinux/[^/]+/semanage.trans.LOCK
191
192 shadow_t
193
194 /etc/tcb/.+/shadow.*
195 /etc/shadow.*
196 /etc/gshadow.*
197 /etc/nshadow.*
198 /var/db/shadow.*
199 /etc/security/opasswd
200 /etc/security/opasswd.old
201
202 smsd_var_lib_t
203
204 /var/lib/smstools(/.*)?
205
206 stapserver_var_lib_t
207
208 /var/lib/stap-server(/.*)?
209
210 user_home_type
211
212 all user home files
213
214 useradd_var_run_t
215
216
217
219 SELinux requires files to have an extended attribute to define the file
220 type.
221
222 You can see the context of a file using the -Z option to ls
223
224 Policy governs the access confined processes have to these files.
225 SELinux useradd policy is very flexible allowing users to setup their
226 useradd processes in as secure a method as possible.
227
228 STANDARD FILE CONTEXT
229
230 SELinux defines the file context types for the useradd, if you wanted
231 to store files with these types in a different paths, you need to exe‐
232 cute the semanage command to specify alternate labeling and then use
233 restorecon to put the labels on disk.
234
235 semanage fcontext -a -t useradd_exec_t '/srv/useradd/content(/.*)?'
236 restorecon -R -v /srv/myuseradd_content
237
238 Note: SELinux often uses regular expressions to specify labels that
239 match multiple files.
240
241 The following file types are defined for useradd:
242
243
244
245 useradd_exec_t
246
247 - Set files with the useradd_exec_t type, if you want to transition an
248 executable to the useradd_t domain.
249
250
251 Paths:
252 /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod,
253 /usr/sbin/newusers
254
255
256 useradd_var_run_t
257
258 - Set files with the useradd_var_run_t type, if you want to store the
259 useradd files under the /run or /var/run directory.
260
261
262
263 Note: File context can be temporarily modified with the chcon command.
264 If you want to permanently change the file context you need to use the
265 semanage fcontext command. This will modify the SELinux labeling data‐
266 base. You will need to use restorecon to apply the labels.
267
268
270 semanage fcontext can also be used to manipulate default file context
271 mappings.
272
273 semanage permissive can also be used to manipulate whether or not a
274 process type is permissive.
275
276 semanage module can also be used to enable/disable/install/remove pol‐
277 icy modules.
278
279 semanage boolean can also be used to manipulate the booleans
280
281
282 system-config-selinux is a GUI tool available to customize SELinux pol‐
283 icy settings.
284
285
287 This manual page was auto-generated using sepolicy manpage .
288
289
291 selinux(8), useradd(8), semanage(8), restorecon(8), chcon(1), sepol‐
292 icy(8), setsebool(8)
293
294
295
296useradd 23-10-20 useradd_selinux(8)