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 allow all domains to execute in fips_mode, you must turn
67 on the fips_mode boolean. Enabled by default.
68
69 setsebool -P fips_mode 1
70
71
72
73 If you want to allow confined applications to run with kerberos, you
74 must turn on the kerberos_enabled boolean. Disabled by default.
75
76 setsebool -P kerberos_enabled 1
77
78
79
80 If you want to allow system to run with NIS, you must turn on the
81 nis_enabled boolean. Disabled by default.
82
83 setsebool -P nis_enabled 1
84
85
86
87 If you want to allow confined applications to use nscd shared memory,
88 you must turn on the nscd_use_shm boolean. Disabled by default.
89
90 setsebool -P nscd_use_shm 1
91
92
93
94 If you want to allow samba to act as the domain controller, add users,
95 groups and change passwords, you must turn on the samba_domain_con‐
96 troller boolean. Disabled by default.
97
98 setsebool -P samba_domain_controller 1
99
100
101
103 The SELinux process type passwd_t can manage files labeled with the
104 following file types. The paths listed are the default paths for these
105 file types. Note the processes UID still need to have DAC permissions.
106
107 faillog_t
108
109 /var/log/btmp.*
110 /var/log/faillog.*
111 /var/log/tallylog.*
112 /var/run/faillock(/.*)?
113
114 krb5_host_rcache_t
115
116 /var/cache/krb5rcache(/.*)?
117 /var/tmp/nfs_0
118 /var/tmp/DNS_25
119 /var/tmp/host_0
120 /var/tmp/imap_0
121 /var/tmp/HTTP_23
122 /var/tmp/HTTP_48
123 /var/tmp/ldap_55
124 /var/tmp/ldap_487
125 /var/tmp/ldapmap1_0
126
127 lastlog_t
128
129 /var/log/lastlog.*
130
131 passwd_file_t
132
133 /etc/group[-+]?
134 /etc/passwd[-+]?
135 /etc/passwd.adjunct.*
136 /etc/ptmptmp
137 /etc/.pwd.lock
138 /etc/group.lock
139 /etc/passwd.OLD
140 /etc/passwd.lock
141
142 security_t
143
144 /selinux
145
146 shadow_t
147
148 /etc/shadow.*
149 /etc/gshadow.*
150 /etc/nshadow.*
151 /var/db/shadow.*
152 /etc/security/opasswd
153 /etc/security/opasswd.old
154
155 sssd_public_t
156
157 /var/lib/sss/mc(/.*)?
158 /var/lib/sss/pubconf(/.*)?
159
160 sssd_var_lib_t
161
162 /var/lib/sss(/.*)?
163
164 user_tmp_t
165
166 /dev/shm/mono.*
167 /var/run/user(/.*)?
168 /tmp/.ICE-unix(/.*)?
169 /tmp/.X11-unix(/.*)?
170 /dev/shm/pulse-shm.*
171 /tmp/.X0-lock
172 /tmp/hsperfdata_root
173 /var/tmp/hsperfdata_root
174 /home/[^/]+/tmp
175 /home/[^/]+/.tmp
176 /tmp/gconfd-[^/]+
177
178
180 SELinux requires files to have an extended attribute to define the file
181 type.
182
183 You can see the context of a file using the -Z option to ls
184
185 Policy governs the access confined processes have to these files.
186 SELinux passwd policy is very flexible allowing users to setup their
187 passwd processes in as secure a method as possible.
188
189 STANDARD FILE CONTEXT
190
191 SELinux defines the file context types for the passwd, if you wanted to
192 store files with these types in a diffent paths, you need to execute
193 the semanage command to sepecify alternate labeling and then use
194 restorecon to put the labels on disk.
195
196 semanage fcontext -a -t passwd_file_t '/srv/mypasswd_content(/.*)?'
197 restorecon -R -v /srv/mypasswd_content
198
199 Note: SELinux often uses regular expressions to specify labels that
200 match multiple files.
201
202 The following file types are defined for passwd:
203
204
205
206 passwd_exec_t
207
208 - Set files with the passwd_exec_t type, if you want to transition an
209 executable to the passwd_t domain.
210
211
212 Paths:
213 /usr/bin/chage, /usr/bin/passwd, /usr/sbin/chpasswd
214
215
216 passwd_file_t
217
218 - Set files with the passwd_file_t type, if you want to treat the files
219 as passwd content.
220
221
222 Paths:
223 /etc/group[-+]?, /etc/passwd[-+]?, /etc/passwd.adjunct.*,
224 /etc/ptmptmp, /etc/.pwd.lock, /etc/group.lock, /etc/passwd.OLD,
225 /etc/passwd.lock
226
227
228 Note: File context can be temporarily modified with the chcon command.
229 If you want to permanently change the file context you need to use the
230 semanage fcontext command. This will modify the SELinux labeling data‐
231 base. You will need to use restorecon to apply the labels.
232
233
235 semanage fcontext can also be used to manipulate default file context
236 mappings.
237
238 semanage permissive can also be used to manipulate whether or not a
239 process type is permissive.
240
241 semanage module can also be used to enable/disable/install/remove pol‐
242 icy modules.
243
244 semanage boolean can also be used to manipulate the booleans
245
246
247 system-config-selinux is a GUI tool available to customize SELinux pol‐
248 icy settings.
249
250
252 This manual page was auto-generated using sepolicy manpage .
253
254
256 selinux(8), passwd(8), semanage(8), restorecon(8), chcon(1), sepol‐
257 icy(8), setsebool(8)
258
259
260
261passwd 19-12-02 passwd_selinux(8)