Lines 1-6
Link Here
|
1 |
--- bin/google_oslogin_control.orig 2017-12-13 23:47:59 UTC |
1 |
--- bin/google_oslogin_control.orig 2018-02-27 22:53:04 UTC |
2 |
+++ bin/google_oslogin_control |
2 |
+++ bin/google_oslogin_control |
3 |
@@ -65,29 +65,31 @@ overwrite_file() { |
3 |
@@ -65,22 +65,24 @@ overwrite_file() { |
4 |
|
4 |
|
5 |
remove_from_config() { |
5 |
remove_from_config() { |
6 |
config=$1 |
6 |
config=$1 |
Lines 30-46
Link Here
|
30 |
} |
30 |
} |
31 |
|
31 |
|
32 |
add_to_pam_config() { |
32 |
add_to_pam_config() { |
33 |
remove_from_config ${pam_config} |
33 |
@@ -97,9 +99,9 @@ ${pam_homedir} |
34 |
- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new |
34 |
" |
35 |
- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new |
35 |
echo "${added_config}$(cat ${pam_config}.new)" > ${pam_config}.new |
36 |
- sed -i "/pam_loginuid.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new |
36 |
else |
37 |
+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new |
37 |
- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new |
38 |
+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new |
38 |
- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new |
39 |
+ gsed -i "/session.*pam_permit.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new |
39 |
- sed -i "/pam_loginuid.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new |
|
|
40 |
+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new |
41 |
+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new |
42 |
+ gsed -i "/session.*pam_permit.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new |
43 |
fi |
40 |
} |
44 |
} |
41 |
|
45 |
|
42 |
restart_service() { |
46 |
@@ -113,7 +115,7 @@ restart_service() { |
43 |
@@ -100,7 +102,7 @@ restart_service() { |
|
|
44 |
fi |
47 |
fi |
45 |
fi |
48 |
fi |
46 |
if which service > /dev/null 2>&1; then |
49 |
if which service > /dev/null 2>&1; then |