Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- chown root:root /home
- chmod 755 /home
- USERS=$(grep '/home' /etc/passwd | tr "\n" "\n")
- for USER in $USERS
- do
- IFS=":" read -ra DETAILS <<< "$USER"
- $(chown -R ${DETAILS[0]}:${DETAILS[0]} ${DETAILS[5]})
- $(chmod -R 750 ${DETAILS[5]})
- done
Add Comment
Please, Sign In to add comment