Browse code

add a new user stack with sudoers privileges (start of using sudo again)

Jesse Andrews authored on 2011/09/13 13:46:12
Showing 1 changed files
... ...
@@ -51,5 +51,11 @@ if [ -f /root/.ssh/id_rsa.pub ]; then
51 51
 fi
52 52
 
53 53
 # set root password to password
54
-echo root:password | chroot $DEST chpasswd
54
+echo root:pass | chroot $DEST chpasswd
55 55
 
56
+# create a stack user
57
+chroot $DEST useradd stack -s /bin/bash -d /opt
58
+echo stack:pass | chroot $DEST chpasswd
59
+chroot $DEST chown -R stack /opt
60
+
61
+echo "stack ALL=(ALL) NOPASSWD: ALL" >> $DEST/etc/sudoers