Fixed permissions on sudoers file.
This commit is contained in:
parent
f08d740969
commit
a0d9ce083e
2 changed files with 4 additions and 2 deletions
|
@ -7,8 +7,8 @@ function rebootMachine() {
|
|||
machine="0${machine}"
|
||||
fi
|
||||
machine="chrome${machine}.duensing.digital"
|
||||
echo "Attempting reboot of ${machne}..."
|
||||
sshpass -p password ssh -o "StrictHostKeyChecking=no" user@${machine} "reboot"
|
||||
echo "Attempting reboot of ${machine}..."
|
||||
sshpass -p password ssh -o "StrictHostKeyChecking=no" user@${machine} "sudo reboot"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,5 +38,7 @@ function unsafeUpdateRoot() {
|
|||
# Allow 'user' to reboot machine.
|
||||
if [[ ! -f /etc/sudoers.d/userreboot ]]; then
|
||||
echo 'user ALL = NOPASSWD: /usr/sbin/halt, /usr/sbin/reboot, /usr/sbin/poweroff' > /etc/sudoers.d/userreboot
|
||||
chown root:root /etc/sudoers.d/userreboot
|
||||
chmod a-w /etc/sudoers.d/userreboot
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue