blob: 0c17f018f0ce8ac35db097af2af8d48159f59fa2 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
#!/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)"
if getent passwd "$user" >/dev/null 2>&1; then
echo "Your account has been created, go ahead and log in: ssh $user@$(hostname -f)"
else
echo "An error occurred, the account $user didn't get created, please go ask steering" >&2
exit 1
fi
|