-
Notifications
You must be signed in to change notification settings - Fork 0
/
0004-Add-Arch-Linux-defaults-for-etc-pam.d.patch
201 lines (193 loc) · 5.56 KB
/
0004-Add-Arch-Linux-defaults-for-etc-pam.d.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
From 8727ea3e58908d3270e68c1614308682b70a44c1 Mon Sep 17 00:00:00 2001
From: David Runge <[email protected]>
Date: Sat, 5 Nov 2022 22:52:58 +0100
Subject: [PATCH 4/4] Add Arch Linux defaults for /etc/pam.d/
etc/pam.d/Makefile.am:
Disable chfn, chsh and login.
Enable shadow.
Always install the PAM integration for the account tools (even if they
are not setuid).
etc/pam.d/{chage,chpasswd,group{add,del,mod},newusers,passwd,shadow,user{add,del,mod}}:
Add distribution defaults for Arch Linux.
s
---
etc/pam.d/Makefile.am | 7 ++-----
etc/pam.d/chage | 6 ++++--
etc/pam.d/chpasswd | 6 ++++--
etc/pam.d/groupadd | 6 ++++--
etc/pam.d/groupdel | 6 ++++--
etc/pam.d/groupmod | 6 ++++--
etc/pam.d/newusers | 6 ++++--
etc/pam.d/passwd | 4 +---
etc/pam.d/shadow | 6 ++++++
etc/pam.d/useradd | 6 ++++--
etc/pam.d/userdel | 6 ++++--
etc/pam.d/usermod | 6 ++++--
12 files changed, 45 insertions(+), 26 deletions(-)
create mode 100644 etc/pam.d/shadow
diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am
index 38ff26ae..41e43e01 100644
--- a/etc/pam.d/Makefile.am
+++ b/etc/pam.d/Makefile.am
@@ -2,10 +2,8 @@
# and also cooperate to make a distribution for `make dist'
pamd_files = \
- chfn \
- chsh \
groupmems \
- login \
+ shadow \
passwd
pamd_acct_tools_files = \
@@ -23,10 +21,9 @@ pamd_acct_tools_files = \
if USE_PAM
pamddir = $(sysconfdir)/pam.d
pamd_DATA = $(pamd_files)
-if ACCT_TOOLS_SETUID
+# NOTE: we are always installing the PAM integration for the account tools
pamd_DATA += $(pamd_acct_tools_files)
endif
-endif
if WITH_SU
pamd_files += su
diff --git a/etc/pam.d/chage b/etc/pam.d/chage
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/chage
+++ b/etc/pam.d/chage
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/chpasswd b/etc/pam.d/chpasswd
index 8f49f5cc..5d447985 100644
--- a/etc/pam.d/chpasswd
+++ b/etc/pam.d/chpasswd
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_unix.so sha512 shadow
diff --git a/etc/pam.d/groupadd b/etc/pam.d/groupadd
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/groupadd
+++ b/etc/pam.d/groupadd
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/groupdel b/etc/pam.d/groupdel
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/groupdel
+++ b/etc/pam.d/groupdel
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/groupmod b/etc/pam.d/groupmod
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/groupmod
+++ b/etc/pam.d/groupmod
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/newusers b/etc/pam.d/newusers
index 8f49f5cc..5d447985 100644
--- a/etc/pam.d/newusers
+++ b/etc/pam.d/newusers
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_unix.so sha512 shadow
diff --git a/etc/pam.d/passwd b/etc/pam.d/passwd
index 731c0d36..08d819b2 100644
--- a/etc/pam.d/passwd
+++ b/etc/pam.d/passwd
@@ -1,4 +1,2 @@
#%PAM-1.0
-auth include system-auth
-account include system-auth
-password include system-auth
+password required pam_unix.so sha512 shadow nullok
diff --git a/etc/pam.d/shadow b/etc/pam.d/shadow
new file mode 100644
index 00000000..a7bf8a4a
--- /dev/null
+++ b/etc/pam.d/shadow
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/useradd b/etc/pam.d/useradd
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/useradd
+++ b/etc/pam.d/useradd
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/userdel b/etc/pam.d/userdel
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/userdel
+++ b/etc/pam.d/userdel
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/etc/pam.d/usermod b/etc/pam.d/usermod
index 8f49f5cc..a7bf8a4a 100644
--- a/etc/pam.d/usermod
+++ b/etc/pam.d/usermod
@@ -1,4 +1,6 @@
#%PAM-1.0
auth sufficient pam_rootok.so
-account required pam_permit.so
-password include system-auth
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
--
2.39.0