Advertisement
noes1s

Linux trick: sudo without password

May 14th, 2011
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. ### Use sudo without password
  2. nopass(){
  3.     cp /etc/sudoers /etc/sudoers.bak &&
  4.     user=$(who wants beer? |awk '{print $1}') &&
  5.     echo "$user ALL=NOPASSWD: ALL" |tee -a /etc/sudoers
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement