1passwd_selinux(8) SELinux Policy passwd passwd_selinux(8)
2
3
4
6 passwd_selinux - Security Enhanced Linux Policy for the passwd pro‐
7 cesses
8
10 Security-Enhanced Linux secures the passwd processes via flexible
11 mandatory access control.
12
13 The passwd processes execute with the passwd_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 passwd_t
20
21
22
24 The passwd_t SELinux type can be entered via the passwd_exec_t file
25 type.
26
27 The default entrypoint paths for the passwd_t domain are the following:
28
29 /usr/bin/chage, /usr/bin/passwd, /usr/sbin/chpasswd
30
32 SELinux defines process types (domains) for each process running on the
33 system
34
35 You can see the context of a process using the -Z option to ps
36
37 Policy governs the access confined processes have to files. SELinux
38 passwd policy is very flexible allowing users to setup their passwd
39 processes in as secure a method as possible.
40
41 The following process types are defined for passwd:
42
43 passwd_t
44
45 Note: semanage permissive -a passwd_t can be used to make the process
46 type passwd_t permissive. SELinux does not deny access to permissive
47 process types, but the AVC (SELinux denials) messages are still gener‐
48 ated.
49
50
52 SELinux policy is customizable based on least access required. passwd
53 policy is extremely flexible and has several booleans that allow you to
54 manipulate the policy and run passwd with the tightest access possible.
55
56
57
58 If you want to allow users to resolve user passwd entries directly from
59 ldap rather then using a sssd server, you must turn on the authlo‐
60 gin_nsswitch_use_ldap boolean. Disabled by default.
61
62 setsebool -P authlogin_nsswitch_use_ldap 1
63
64
65
66 If you want to deny any process from ptracing or debugging any other
67 processes, you must turn on the deny_ptrace boolean. Enabled by
68 default.
69
70 setsebool -P deny_ptrace 1
71
72
73
74 If you want to allow any process to mmap any file on system with
75 attribute file_type, you must turn on the domain_can_mmap_files bool‐
76 ean. Enabled by default.
77
78 setsebool -P domain_can_mmap_files 1
79
80
81
82 If you want to allow all domains write to kmsg_device, while kernel is
83 executed with systemd.log_target=kmsg parameter, you must turn on the
84 domain_can_write_kmsg boolean. Disabled by default.
85
86 setsebool -P domain_can_write_kmsg 1
87
88
89
90 If you want to allow all domains to use other domains file descriptors,
91 you must turn on the domain_fd_use boolean. Enabled by default.
92
93 setsebool -P domain_fd_use 1
94
95
96
97 If you want to allow all domains to have the kernel load modules, you
98 must turn on the domain_kernel_load_modules boolean. Disabled by
99 default.
100
101 setsebool -P domain_kernel_load_modules 1
102
103
104
105 If you want to allow all domains to execute in fips_mode, you must turn
106 on the fips_mode boolean. Enabled by default.
107
108 setsebool -P fips_mode 1
109
110
111
112 If you want to enable reading of urandom for all domains, you must turn
113 on the global_ssp boolean. Disabled by default.
114
115 setsebool -P global_ssp 1
116
117
118
119 If you want to allow confined applications to run with kerberos, you
120 must turn on the kerberos_enabled boolean. Enabled by default.
121
122 setsebool -P kerberos_enabled 1
123
124
125
126 If you want to allow system to run with NIS, you must turn on the
127 nis_enabled boolean. Disabled by default.
128
129 setsebool -P nis_enabled 1
130
131
132
133 If you want to allow confined applications to use nscd shared memory,
134 you must turn on the nscd_use_shm boolean. Disabled by default.
135
136 setsebool -P nscd_use_shm 1
137
138
139
140 If you want to allow samba to act as the domain controller, add users,
141 groups and change passwords, you must turn on the samba_domain_con‐
142 troller boolean. Disabled by default.
143
144 setsebool -P samba_domain_controller 1
145
146
147
149 The SELinux process type passwd_t can manage files labeled with the
150 following file types. The paths listed are the default paths for these
151 file types. Note the processes UID still need to have DAC permissions.
152
153 faillog_t
154
155 /var/log/btmp.*
156 /var/log/faillog.*
157 /var/log/tallylog.*
158 /var/run/faillock(/.*)?
159
160 krb5_host_rcache_t
161
162 /var/cache/krb5rcache(/.*)?
163 /var/tmp/nfs_0
164 /var/tmp/DNS_25
165 /var/tmp/host_0
166 /var/tmp/imap_0
167 /var/tmp/HTTP_23
168 /var/tmp/HTTP_48
169 /var/tmp/ldap_55
170 /var/tmp/ldap_487
171 /var/tmp/ldapmap1_0
172
173 lastlog_t
174
175 /var/log/lastlog.*
176
177 passwd_file_t
178
179 /etc/group[-+]?
180 /etc/passwd[-+]?
181 /etc/passwd.adjunct.*
182 /etc/ptmptmp
183 /etc/.pwd.lock
184 /etc/group.lock
185 /etc/passwd.OLD
186 /etc/passwd.lock
187
188 security_t
189
190 /selinux
191
192 shadow_t
193
194 /etc/shadow.*
195 /etc/gshadow.*
196 /etc/nshadow.*
197 /var/db/shadow.*
198 /etc/security/opasswd
199 /etc/security/opasswd.old
200
201 user_tmp_t
202
203 /dev/shm/mono.*
204 /var/run/user(/.*)?
205 /tmp/.X11-unix(/.*)?
206 /tmp/.ICE-unix(/.*)?
207 /dev/shm/pulse-shm.*
208 /tmp/.X0-lock
209 /tmp/hsperfdata_root
210 /var/tmp/hsperfdata_root
211 /home/[^/]+/tmp
212 /home/[^/]+/.tmp
213 /tmp/gconfd-[^/]+
214
215
217 SELinux requires files to have an extended attribute to define the file
218 type.
219
220 You can see the context of a file using the -Z option to ls
221
222 Policy governs the access confined processes have to these files.
223 SELinux passwd policy is very flexible allowing users to setup their
224 passwd processes in as secure a method as possible.
225
226 STANDARD FILE CONTEXT
227
228 SELinux defines the file context types for the passwd, if you wanted to
229 store files with these types in a diffent paths, you need to execute
230 the semanage command to sepecify alternate labeling and then use
231 restorecon to put the labels on disk.
232
233 semanage fcontext -a -t passwd_file_t '/srv/mypasswd_content(/.*)?'
234 restorecon -R -v /srv/mypasswd_content
235
236 Note: SELinux often uses regular expressions to specify labels that
237 match multiple files.
238
239 The following file types are defined for passwd:
240
241
242
243 passwd_exec_t
244
245 - Set files with the passwd_exec_t type, if you want to transition an
246 executable to the passwd_t domain.
247
248
249 Paths:
250 /usr/bin/chage, /usr/bin/passwd, /usr/sbin/chpasswd
251
252
253 passwd_file_t
254
255 - Set files with the passwd_file_t type, if you want to treat the files
256 as passwd content.
257
258
259 Paths:
260 /etc/group[-+]?, /etc/passwd[-+]?, /etc/passwd.adjunct.*,
261 /etc/ptmptmp, /etc/.pwd.lock, /etc/group.lock, /etc/passwd.OLD,
262 /etc/passwd.lock
263
264
265 Note: File context can be temporarily modified with the chcon command.
266 If you want to permanently change the file context you need to use the
267 semanage fcontext command. This will modify the SELinux labeling data‐
268 base. You will need to use restorecon to apply the labels.
269
270
272 semanage fcontext can also be used to manipulate default file context
273 mappings.
274
275 semanage permissive can also be used to manipulate whether or not a
276 process type is permissive.
277
278 semanage module can also be used to enable/disable/install/remove pol‐
279 icy modules.
280
281 semanage boolean can also be used to manipulate the booleans
282
283
284 system-config-selinux is a GUI tool available to customize SELinux pol‐
285 icy settings.
286
287
289 This manual page was auto-generated using sepolicy manpage .
290
291
293 selinux(8), passwd(8), semanage(8), restorecon(8), chcon(1), sepol‐
294 icy(8) , setsebool(8)
295
296
297
298passwd 19-04-25 passwd_selinux(8)