daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest Dec 16th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. chown root:root /home
  4.  
  5. chmod 755 /home
  6.  
  7. USERS=$(grep '/home' /etc/passwd | tr "\n" "\n")
  8.  
  9. for USER in $USERS
  10. do
  11.     IFS=":" read -ra DETAILS <<< "$USER"
  12.  
  13.     $(chown -R ${DETAILS[0]}:${DETAILS[0]} ${DETAILS[5]})
  14.  
  15.     $(chmod -R 750 ${DETAILS[5]})
  16. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top