We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cc089d7 + a9c2711 commit eab7737Copy full SHA for eab7737
esxi-fix-pam-ssh-auth.sh
@@ -0,0 +1,25 @@
1
+#!/bin/sh
2
+
3
+/bin/grep '^#PAMFix' /etc/rc.local.d/local.sh > /dev/null 2>&1
4
5
+if [ $? != 0 ]
6
+then
7
+ /bin/sed -i '/exit 0/d' /etc/rc.local.d/local.sh
8
+ cat <<EOF >> /etc/rc.local.d/local.sh
9
10
+for i in \$(/bin/grep "/bin/sh" /etc/passwd | cut -f1 -d":")
11
+do
12
+ /bin/sed -i 's/^-:'\$i':/+:'\$i':/g' /etc/security/access.conf
13
+done
14
15
+/bin/grep local.sh /var/spool/cron/crontabs/root > /dev/null 2>&1
16
+if [ \$? != 0 ]
17
18
+ echo '* * * * * /etc/rc.local.d/local.sh' >> /var/spool/cron/crontabs/root
19
+fi
20
+#PAMFix
21
+EOF
22
23
24
+/etc/rc.local.d/local.sh
25
+/sbin/auto-backup.sh
0 commit comments