Skip to content

Deployment and Maintenance / Reset Administrator Password

This article mainly describes how to reset the administrator password after you forget it.

1. Prerequisites

To reset the system administrator password, you need access to the host machine where DataFlux Func is located, or to the running DataFlux Func container.

The administrator tool can only be operated after entering the DataFlux Func container.

2. Specific Operations

DataFlux Func provides the administrator tool admin-tool.py. If you forget the system administrator password, you can use the administrator tool to reset it.

The specific commands are as follows:

  • Outside the container
Bash
1
docker exec -it {DataFlux Func container ID} sh -c 'exec python admin-tool.py reset_admin'
  • Inside the container
Bash
1
cd /usr/src/app; python admin-tool.py reset_admin

Modification example:

Text Only
1
2
3
4
Enter new Admin username: admin                    # Specify the administrator username (admin here)
Enter new password for [admin]:                    # Specify the new administrator password
Confirm new password:                              # Re-enter the new administrator password
Are you sure you want to do this? (yes/no): yes    # Type yes to confirm the change

3. More Options

If there is a need for automated operations and maintenance, you can use the following method to directly specify the administrator username and new password, skipping terminal interaction:

  • Outside the container
Bash
1
docker exec -it {DataFlux Func container ID} sh -c 'exec python admin-tool.py reset_admin -f --admin-username={administrator username} --admin-password={administrator new password}'
  • Inside the container
Bash
1
cd /usr/src/app; python admin-tool.py reset_admin -f --admin-username={username} --admin-password={new password}

4. Administrator Tool admin-tool.py

For more detailed usage of the administrator tool, please refer to Deployment and Maintenance / Administrator Tool