diff options
| -rwxr-xr-x | new_user_created.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/new_user_created.sh b/new_user_created.sh index 0c17f01..ff80c80 100755 --- a/new_user_created.sh +++ b/new_user_created.sh @@ -4,8 +4,11 @@ read method type key <$SSH_USER_AUTH user="$(grep -l -s -r -P '^\s*auth:\s*\Q'"$type"'\E\s+\Q'"$key"'\E$' /opt/autopeer/dn42-registry/data/mntner/ | perl -ne 's@^.*/@@; s@-MNT$@@; print lc;' | head -1)" if getent passwd "$user" >/dev/null 2>&1; then - echo "Your account has been created, go ahead and log in: ssh $user@$(hostname -f)" + echo "Your account has been created, go ahead and log in:" + echo "ssh $user@$(hostname -f)" + echo else - echo "An error occurred, the account $user didn't get created, please go ask steering" >&2 + echo "Some error occurred, the account $user didn't get created, please go ask steering" >&2 + echo exit 1 fi |
