add a new user stack with sudoers privileges (start of using sudo again)
This commit is contained in:
parent
4f0c9bc6a8
commit
9a052d5d9c
@ -51,5 +51,11 @@ if [ -f /root/.ssh/id_rsa.pub ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# set root password to password
|
# set root password to password
|
||||||
echo root:password | chroot $DEST chpasswd
|
echo root:pass | chroot $DEST chpasswd
|
||||||
|
|
||||||
|
# create a stack user
|
||||||
|
chroot $DEST useradd stack -s /bin/bash -d /opt
|
||||||
|
echo stack:pass | chroot $DEST chpasswd
|
||||||
|
chroot $DEST chown -R stack /opt
|
||||||
|
|
||||||
|
echo "stack ALL=(ALL) NOPASSWD: ALL" >> $DEST/etc/sudoers
|
||||||
|
Loading…
Reference in New Issue
Block a user