Add sudoers entry for current user using whoami

This commit is contained in:
Bob Lantz
2012-11-19 17:30:09 -08:00
parent 3744638e5c
commit 0ce366b5d2
+1 -3
View File
@@ -4,9 +4,7 @@
# a brand-new Ubuntu virtual machine,
# to create a fully usable "tutorial" VM.
set -e
sudo sh -c 'cat >> /etc/sudoers' <<EOF
openflow ALL=NOPASSWD: ALL
EOF
echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers
sudo sed -i -e 's/Default/#Default/' /etc/sudoers
sudo sed -i -e 's/ubuntu/mininet-vm/' /etc/hostname
sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts