Skip to content

Investigate auto-user signup #40

@daurnimator

Description

@daurnimator
#!/bin/bash

set -eufo pipefail

user="$1"
key="$2"

logger "Handling user login $user: $key"

psql "$POSTGRES_URI" \
  -t --pset border=0 \
  --set user="$user" \
  --set pubkey="$key" \
  <<< "insert into passwd(name, data) values(:'user', '{"shell": "/bin/bash", "ssh_keys":[' || :'pubkey' || '])'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions