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 useradd_exec_t,
25 user_home_t file types.
26
27 The default entrypoint paths for the useradd_t domain are the follow‐
28 ing:
29
30 /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod,
31 /usr/sbin/newusers, /home/[^/]+/.+
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. Enabled 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 krb5kdc_var_lib_t
128
129 /var/lib/kdcproxy(/.*)?
130
131 lastlog_t
132
133 /var/log/lastlog.*
134
135 mail_spool_t
136
137 /var/mail(/.*)?
138 /var/spool/imap(/.*)?
139 /var/spool/mail(/.*)?
140 /var/spool/smtpd(/.*)?
141
142 nfs_t
143
144
145 openshift_file_type
146
147
148 security_t
149
150 /selinux
151
152 selinux_login_config_t
153
154 /etc/selinux/([^/]*/)?logins(/.*)?
155
156 semanage_read_lock_t
157
158 /etc/selinux/([^/]*/)?modules/semanage.read.LOCK
159 /var/lib/selinux/[^/]+/semanage.read.LOCK
160
161 semanage_store_t
162
163 /etc/selinux/([^/]*/)?policy(/.*)?
164 /etc/selinux/(minimum|mls|targeted)/active(/.*)?
165 /etc/selinux/([^/]*/)?modules/(active|tmp|previous)(/.*)?
166 /var/lib/selinux(/.*)?
167 /etc/share/selinux/mls(/.*)?
168 /etc/share/selinux/targeted(/.*)?
169
170 semanage_trans_lock_t
171
172 /etc/selinux/([^/]*/)?modules/semanage.trans.LOCK
173 /var/lib/selinux/[^/]+/semanage.trans.LOCK
174
175 shadow_t
176
177 /etc/shadow.*
178 /etc/gshadow.*
179 /etc/nshadow.*
180 /var/db/shadow.*
181 /etc/security/opasswd
182 /etc/security/opasswd.old
183
184 smsd_var_lib_t
185
186 /var/lib/smstools(/.*)?
187
188 stapserver_var_lib_t
189
190 /var/lib/stap-server(/.*)?
191
192 user_home_type
193
194 all user home files
195
196 useradd_var_run_t
197
198
199
201 SELinux requires files to have an extended attribute to define the file
202 type.
203
204 You can see the context of a file using the -Z option to ls
205
206 Policy governs the access confined processes have to these files.
207 SELinux useradd policy is very flexible allowing users to setup their
208 useradd processes in as secure a method as possible.
209
210 STANDARD FILE CONTEXT
211
212 SELinux defines the file context types for the useradd, if you wanted
213 to store files with these types in a diffent paths, you need to execute
214 the semanage command to sepecify alternate labeling and then use
215 restorecon to put the labels on disk.
216
217 semanage fcontext -a -t useradd_var_run_t '/srv/myuseradd_con‐
218 tent(/.*)?'
219 restorecon -R -v /srv/myuseradd_content
220
221 Note: SELinux often uses regular expressions to specify labels that
222 match multiple files.
223
224 The following file types are defined for useradd:
225
226
227
228 useradd_exec_t
229
230 - Set files with the useradd_exec_t type, if you want to transition an
231 executable to the useradd_t domain.
232
233
234 Paths:
235 /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod,
236 /usr/sbin/newusers
237
238
239 useradd_var_run_t
240
241 - Set files with the useradd_var_run_t type, if you want to store the
242 useradd files under the /run or /var/run directory.
243
244
245
246 Note: File context can be temporarily modified with the chcon command.
247 If you want to permanently change the file context you need to use the
248 semanage fcontext command. This will modify the SELinux labeling data‐
249 base. You will need to use restorecon to apply the labels.
250
251
253 semanage fcontext can also be used to manipulate default file context
254 mappings.
255
256 semanage permissive can also be used to manipulate whether or not a
257 process type is permissive.
258
259 semanage module can also be used to enable/disable/install/remove pol‐
260 icy modules.
261
262 semanage boolean can also be used to manipulate the booleans
263
264
265 system-config-selinux is a GUI tool available to customize SELinux pol‐
266 icy settings.
267
268
270 This manual page was auto-generated using sepolicy manpage .
271
272
274 selinux(8), useradd(8), semanage(8), restorecon(8), chcon(1), sepol‐
275 icy(8), setsebool(8)
276
277
278
279useradd 21-03-26 useradd_selinux(8)