Created
November 14, 2018 17:43
-
-
Save sixtyfive/a9016fc39c0b3518308d15150b9dcdeb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cut -d':' -f'1,6' /etc/passwd | while IFS=: read username userhome; do | |
rcfile="$userhome/.rc" | |
if case $rcfile in "/home"*) true;; *) false;; esac; then | |
if test -x "$rcfile"; then | |
su -c "$rcfile" "$username" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment