Created
June 14, 2016 21:41
-
-
Save WaaromZoMoeilijk/b1ad1001117ab8cafce8cf1c0836b528 to your computer and use it in GitHub Desktop.
This file contains 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
# Check if the user ncadmin exists, if not create it. This option for installs other then the pre-configured VM | |
ret=false | |
getent passwd $UNIXUSER >/dev/null 2>&1 && ret=true | |
if $ret; then | |
echo | |
echo "User $UNIXUSER exists..." | |
echo | |
else | |
adduser --gecos GECOS $UNIXUSER << EOF | |
$UNIXPASS | |
$UNIXPASS | |
y | |
EOF | |
usermod -aG sudo $UNIXUSER | |
echo | |
echo "User $UNIXUSER created..." | |
echo | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment