Created
July 20, 2017 22:25
-
-
Save erikerlandson/ffdfbe14c41a28b39962b2b67ce27155 to your computer and use it in GitHub Desktop.
updating a passwd file for randomized openshift uid to make apache spark happy
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
if [ `id -u` -ge 10000 ]; then | |
cat /etc/passwd | sed -e "s/^$NB_USER:/builder:/" > /tmp/passwd | |
echo "$NB_USER:x:`id -u`:`id -g`:,,,:/home/$NB_USER:/bin/bash" >> /tmp/passwd | |
cat /tmp/passwd > /etc/passwd | |
rm /tmp/passwd | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment