Skip to content

Commit

Permalink
[arch] use password for sudo, fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
rroohhh committed Jun 1, 2019
1 parent 124218a commit ad6f909
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions makefiles/host/run_qemu.expect
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ expect {
# TODO: add some basic funtionality tests

send "sudo systemctl poweroff\r"
expect {
"password for operator:" { }
timeout { puts "\ntimed out\n"; exit 1 }
}
send "axiom\n"
expect {
"Power-Off" { }
timeout { puts "\ntimed out\n"; exit 1 }
Expand Down
2 changes: 1 addition & 1 deletion makefiles/in_chroot/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PASS=axiom
USERNAME=operator
if ! [ -d /home/$USERNAME ]; then
useradd -p $(openssl passwd -1 $PASS) -d /home/"$USERNAME" -m -g users -s /bin/bash "$USERNAME"
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "$USERNAME ALL=(ALL) PASSWD: ALL" >> /etc/sudoers
rm -f /home/$USERNAME/.bashrc
fi

Expand Down

0 comments on commit ad6f909

Please sign in to comment.