FAQ. Resetting the password and unlocking the administrator: различия между версиями

Материал из WiKi - UserSide
(Новая страница: «en | ru»)
 
Нет описания правки
Строка 1: Строка 1:
[[FAQ._Resetting_the_password_and_unlocking_the_administrator|en]] | [[FAQ._Сброс_пароля_и_разблокировка_администратора|ru]]
[[FAQ._Resetting_the_password_and_unlocking_the_administrator|en]] | [[FAQ._Сброс_пароля_и_разблокировка_администратора|ru]]
=== From version 3.16 ===
Starting from version 3.16, a console command is available to manage user accounts:
php userside credentials
By default, a list of users and the status of locked accounts is displayed.
The command must be entered in the userside directory (by default /var/www/userside).
==== Reset password ====
To reset a user's password, run the command:
php userside credentials/password-reset admin
The password for the admin user account will be reset.
Command output:
Done! New password for username admin is: dGQl48me34pl7C
==== Unlock ====
To unlock a locked account, run the command:
php userside credentials/unblock admin
This will unlock the admin user account if it has been locked.
Command output:
Done! Username admin was unblocked successfully.
=== Older versions 3.12...3.15 ===
For versions 3.12 to 3.15 included, use a SQL query.
The examples below use the database name ''userside'' and the account's username: ''admin''. Change to yours if they are different before running these queries.
==== Reset password ====
sudo -u postgres psql -d userside -c "UPDATE credentials SET password_hash = '$2y$13$9tw/ZxVyN4TG7nwyzSJjy.qhrtojPibTizH00KEZsBDpLJ7eU5Ob.' WHERE username = 'admin'"
After executing the command, log in with the password 1234 and change it to a secure password.
==== Unlock ====
sudo -u postgres psql -d userside -c "UPDATE credentials SET is_block = false WHERE username = 'admin'"
=== Old versions up to 3.11 ===
In versions 3.11 and older, the credentials are stored in the MySQL database. Queries must be performed for MySQL!
==== Reset password ====
mysql -u имя_пользователя -p -D userside -e "UPDATE tbl_oper SET PASS = '838787c84ef318aa49d61c0eca871605' WHERE OPER = 'Admin'"
After executing the command, log in with the password 1234 and change it to a secure password.
==== Unlock ====
mysql -u имя_пользователя -p -D userside -e "UPDATE tbl_oper SET LOCKED = 0 WHERE OPER = 'Admin'"

Версия от 19:50, 16 марта 2023

en | ru

From version 3.16

Starting from version 3.16, a console command is available to manage user accounts:

php userside credentials

By default, a list of users and the status of locked accounts is displayed.

The command must be entered in the userside directory (by default /var/www/userside).

Reset password

To reset a user's password, run the command:

php userside credentials/password-reset admin

The password for the admin user account will be reset. Command output:

Done! New password for username admin is: dGQl48me34pl7C

Unlock

To unlock a locked account, run the command:

php userside credentials/unblock admin

This will unlock the admin user account if it has been locked. Command output:

Done! Username admin was unblocked successfully.

Older versions 3.12...3.15

For versions 3.12 to 3.15 included, use a SQL query.

The examples below use the database name userside and the account's username: admin. Change to yours if they are different before running these queries.

Reset password

sudo -u postgres psql -d userside -c "UPDATE credentials SET password_hash = '$2y$13$9tw/ZxVyN4TG7nwyzSJjy.qhrtojPibTizH00KEZsBDpLJ7eU5Ob.' WHERE username = 'admin'"

After executing the command, log in with the password 1234 and change it to a secure password.

Unlock

sudo -u postgres psql -d userside -c "UPDATE credentials SET is_block = false WHERE username = 'admin'"

Old versions up to 3.11

In versions 3.11 and older, the credentials are stored in the MySQL database. Queries must be performed for MySQL!

Reset password

mysql -u имя_пользователя -p -D userside -e "UPDATE tbl_oper SET PASS = '838787c84ef318aa49d61c0eca871605' WHERE OPER = 'Admin'"

After executing the command, log in with the password 1234 and change it to a secure password.

Unlock

mysql -u имя_пользователя -p -D userside -e "UPDATE tbl_oper SET LOCKED = 0 WHERE OPER = 'Admin'"