diff options
| author | 2026-04-08 18:51:17 +0000 | |
|---|---|---|
| committer | 2026-04-08 18:51:17 +0000 | |
| commit | 26370d8683075e88e52f2fd9faa099572e941ebd (patch) | |
| tree | 650246c5a19c2246f7789373e0c7802e0277ad31 /authorized_keys.sh | |
| parent | update some show commands (diff) | |
add birdc command
Diffstat (limited to 'authorized_keys.sh')
| -rwxr-xr-x | authorized_keys.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/authorized_keys.sh b/authorized_keys.sh index 1ee9f73..f64fc72 100755 --- a/authorized_keys.sh +++ b/authorized_keys.sh @@ -10,6 +10,7 @@ if [ "$1" = "new" ]; then if 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)"; then perl -ne 'print if s@^\s*auth:\s*ssh-@restrict,pty ssh-@' </opt/autopeer/dn42-registry/data/mntner/"$(echo "$user" | perl -ne 's@$@-MNT@; print uc;')" /usr/sbin/adduser --disabled-password --quiet --comment "created at $(date +%s) by $key $connection" --ingroup autopeer "$user" + /usr/sbin/adduser "$user" bird fi else # not new user perl -ne 'print if s@^\s*auth:\s*ssh-@restrict,pty ssh-@' </opt/autopeer/dn42-registry/data/mntner/"$(echo "$user" | perl -ne 's@$@-MNT@; print uc;')" |
