# this is going to setup passwordless sudo, which is dangerous. # to require passwd, take out NOPASSWD as # echo "`whoami` ALL=(ALL) ALL" > add_me_to_sudoers.txt echo "`whoami` ALL=(ALL) NOPASSWD: ALL" > add_me_to_sudoers.txt # login as root su root chmod 700 /etc/sudoers echo "" >> /etc/sudoers cat add_me_to_sudoers.txt >> /etc/sudoers # logout of root exit # Test if you are still root or your user whoami # If you are the user, lets do a test sudo whoami # It should say root