User auth

MRM

Verified User
Joined
Mar 27, 2023
Messages
12
Hello, about authenticating as root if you are local on that machine with: ./directadmin --root-keyauth, is there a similar way to use it for the user? lets say i have a shared server and i have 5 users that are renting the server from me and i want to use the user credintials via api, does it makes sense or it is okay to use root credintials on shared? i thought it wouldnt be secure enough so im writing this.
 
Last edited:
Hello,

See:

Bash:
# da
Please specify one command of: admin, admin-backup, api-url, config, config-get, config-set, doveadm-quota, info, install, license, login-url, permissions, server, suspend-domain, suspend-user, taskq, unsuspend-domain, unsuspend-user, update or version
Usage:
  directadmin [OPTIONS] <command>

Help Options:
  -h, --help  Show this help message

Available commands:

# ... skipped ...
  api-url           Create a login-key for HTTP API access (aliases: root-auth-url)
# ... skipped ...

and

Bash:
# da api-url --help
Usage:
  directadmin [OPTIONS] api-url [api-url-OPTIONS]

Help Options:
  -h, --help      Show this help message

[api-url command options]
          --user= User (default: admin)
 
Great, many thanks.
See:

Bash:
# da
Please specify one command of: admin, admin-backup, api-url, config, config-get, config-set, doveadm-quota, info, install, license, login-url, permissions, server, suspend-domain, suspend-user, taskq, unsuspend-domain, unsuspend-user, update or version
Usage:
  directadmin [OPTIONS] <command>

Help Options:
  -h, --help  Show this help message

Available commands:

# ... skipped ...
  api-url           Create a login-key for HTTP API access (aliases: root-auth-url)
# ... skipped ...

and

Bash:
# da api-url --help
Usage:
  directadmin [OPTIONS] api-url [api-url-OPTIONS]

Help Options:
  -h, --help      Show this help message

[api-url command options]
          --user= User (default: admin)
 
Last edited:
Hello,

See:

Bash:
# da
Please specify one command of: admin, admin-backup, api-url, config, config-get, config-set, doveadm-quota, info, install, license, login-url, permissions, server, suspend-domain, suspend-user, taskq, unsuspend-domain, unsuspend-user, update or version
Usage:
  directadmin [OPTIONS] <command>

Help Options:
  -h, --help  Show this help message

Available commands:

# ... skipped ...
  api-url           Create a login-key for HTTP API access (aliases: root-auth-url)
# ... skipped ...

and

Bash:
# da api-url --help
Usage:
  directadmin [OPTIONS] api-url [api-url-OPTIONS]

Help Options:
  -h, --help      Show this help message

[api-url command options]
          --user= User (default: admin)
Hello, sorry for the late reply, I think formulated my question in a wrong way.

what I actually want to do is to create an API URL, automated, but only with user rights, so essentially:

Code:
da api-url --user myuser
# root-auth URLs are only supported when executed as root

I would like to create an api url only within my users right scope, is there a way to automate this without having to create one manually via gui?
 
You should be root on the server if you want to create an API URL. For other cases you will need to use username/password combination to access API.
 
Back
Top