Merge "Give stack user passwordless sudo:"
This commit is contained in:
commit
210e69779b
@ -4,9 +4,21 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
useradd -G admin -m stack -s /bin/bash
|
useradd -m stack -s /bin/bash
|
||||||
|
|
||||||
passwd stack <<EOF
|
passwd stack <<EOF
|
||||||
stack
|
stack
|
||||||
stack
|
stack
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
sudo_file=/etc/sudoers.d/stack
|
||||||
|
cat > /etc/sudoers.d/stack <<eof
|
||||||
|
# the stack user sometimes requires passwordless
|
||||||
|
# sudo for scripted operations.
|
||||||
|
stack ALL=(ALL) NOPASSWD:ALL
|
||||||
|
eof
|
||||||
|
|
||||||
|
chmod 0440 $sudo_file
|
||||||
|
|
||||||
|
visudo -c
|
||||||
|
Loading…
Reference in New Issue
Block a user