Skip to content

Commit a9c2711

Browse files
use absolute paths for binaries
1 parent e3a369b commit a9c2711

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

esxi-fix-pam-ssh-auth.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/bin/sh
22

3-
grep '^#PAMFix' /etc/rc.local.d/local.sh > /dev/null 2>&1
3+
/bin/grep '^#PAMFix' /etc/rc.local.d/local.sh > /dev/null 2>&1
44

55
if [ $? != 0 ]
66
then
7-
sed -i '/exit 0/d' /etc/rc.local.d/local.sh
7+
/bin/sed -i '/exit 0/d' /etc/rc.local.d/local.sh
88
cat <<EOF >> /etc/rc.local.d/local.sh
99
10-
for i in \$(grep "/bin/sh" /etc/passwd | cut -f1 -d":")
10+
for i in \$(/bin/grep "/bin/sh" /etc/passwd | cut -f1 -d":")
1111
do
1212
/bin/sed -i 's/^-:'\$i':/+:'\$i':/g' /etc/security/access.conf
1313
done
1414
15-
grep local.sh /var/spool/cron/crontabs/root > /dev/null 2>&1
15+
/bin/grep local.sh /var/spool/cron/crontabs/root > /dev/null 2>&1
1616
if [ \$? != 0 ]
1717
then
1818
echo '* * * * * /etc/rc.local.d/local.sh' >> /var/spool/cron/crontabs/root

0 commit comments

Comments
 (0)