Guest User

Untitled

a guest
Nov 14th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. cut -d':' -f'1,6' /etc/passwd | while IFS=: read username userhome; do
  4. rcfile="$userhome/.rc"
  5. if case $rcfile in "/home"*) true;; *) false;; esac; then
  6. if test -x "$rcfile"; then
  7. su -c "$rcfile" "$username"
  8. fi
  9. fi
  10. done
Add Comment
Please, Sign In to add comment