sctg-development / sctgdesk-api-server

Rustdesk API server and web console for Rustdesk written in Rust (standalone version, for integrated version see https://github.com/sctg-development/sctgdesk-server )
https://sctg-development.github.io/sctgdesk-api-server/
GNU Affero General Public License v3.0
27 stars 13 forks source link

How to change the webconsole administrator user password? #4

Closed Zerorigin closed 2 months ago

Zerorigin commented 2 months ago

The same as title.

VenimK commented 2 months ago

Jus create new user @Zerorigin
/ui/index Users

aeltorio commented 2 months ago

@Zerorigin, thank you for your interest in this project!

As @VenimK mentioned, to change the admin password:

  1. Log in to the web console using the original admin password (Hello,world!)
  2. Navigate to the Users tab
  3. Click the Edit button corresponding to the user you want to modify

For your convenience, I've added two new Wiki pages:

  1. How to Change Admin or Other User Password
  2. How to Recover a Lost Password

These pages provide detailed instructions for managing user passwords, including recovery procedures.

If you have any further questions, please don't hesitate to ask. We're here to help!

Zerorigin commented 2 months ago

There seems to be some unknown error.

image

docker network create \
  --driver=bridge \
  --subnet=172.31.0.0/16 \
  --ip-range=172.31.0.0/16 \
  --gateway=172.31.255.254 \
  br-docker
# version: '3'
networks:
  br-docker:
    external: true

services:
  hbbs:
    container_name: hbbs
    ports:
      - 21114:21114
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
      - 21118:21118
    image: sctg/sctgdesk-server:latest
    command: hbbs -r hbbr.docker.local:21117
    volumes:
      - ./data:/usr/local/share/sctgdesk

    networks:
      br-docker:
        aliases:
          - hbbs.docker.local
        ipv4_address: "172.31.255.171"

    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    ports:
      - 21117:21117
      - 21119:21119
    image: sctg/sctgdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/usr/local/share/sctgdesk
    networks:
      br-docker:
        aliases:
          - hbbr.docker.local
        ipv4_address: "172.31.255.172"

    restart: unless-stopped
aeltorio commented 2 months ago

Sure there is ! Could you stop your docker containers and cd to your data directory.
Next explore the db with

sqlite db_v2.sqlite3
SELECT * from user;
.quit
Zerorigin commented 2 months ago

Sure there is ! Could you stop your docker containers and cd to your data directory. Next explore the db with

sqlite db_v2.sqlite3
SELECT * from user;
.quit

image

I have tried delete the data and recreate the containers, but this does not seem to work.

aeltorio commented 2 months ago

@Zerorigin,

Thank you for reporting this issue. I've successfully reproduced the bug, which occurs due to an empty "email" field for the admin user.

For a quick workaround, you can manually add an email address using the following SQLite commands:

sqlite3 db_v2.sqlite3
UPDATE user SET email='admin@example.com' WHERE name='admin';
.quit

Please note that this is a temporary fix.

I'll work on a proper solution to prevent this issue in future releases.
Let me know if you need any further assistance or have any questions.

Zerorigin commented 2 months ago

@Zerorigin,

Thank you for reporting this issue. I've successfully reproduced the bug, which occurs due to an empty "email" field for the admin user.

For a quick workaround, you can manually add an email address using the following SQLite commands:

sqlite3 db_v2.sqlite3
UPDATE user SET email='admin@example.com' WHERE name='admin';
.quit

Please note that this is a temporary fix.

I'll work on a proper solution to prevent this issue in future releases. Let me know if you need any further assistance or have any questions.

This solution worked for me. No more questions for now.

aeltorio commented 2 months ago

docker image sctg/sctgdesk-server:1.1.99-40 corrects this issue.