aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar steering72532026-05-15 18:37:33 -0600
committerGravatar steering72532026-05-15 18:37:33 -0600
commitd1b5b86087dc9aede4604cc9bbd4aaec51b33006 (patch)
treeba1c0708b6c9391db18fd99ba5ef64a8a23bce8e
parentfix pubkeys with comments (diff)
and in new_user_created too
-rwxr-xr-xnew_user_created.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/new_user_created.sh b/new_user_created.sh
index ff80c80..e00a3bb 100755
--- a/new_user_created.sh
+++ b/new_user_created.sh
@@ -1,7 +1,7 @@
#!/bin/sh
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)"
+user="$(grep -l -s -r -P '^\s*auth:\s*\Q'"$type"'\E\s+\Q'"$key"'\E(\s|$)' /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:"