Add sudoers entry for current user using whoami
This commit is contained in:
@@ -4,9 +4,7 @@
|
|||||||
# a brand-new Ubuntu virtual machine,
|
# a brand-new Ubuntu virtual machine,
|
||||||
# to create a fully usable "tutorial" VM.
|
# to create a fully usable "tutorial" VM.
|
||||||
set -e
|
set -e
|
||||||
sudo sh -c 'cat >> /etc/sudoers' <<EOF
|
echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers
|
||||||
openflow ALL=NOPASSWD: ALL
|
|
||||||
EOF
|
|
||||||
sudo sed -i -e 's/Default/#Default/' /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/' /etc/hostname
|
||||||
sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts
|
sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user