Skip to content

Deployment and Maintenance / Reset Administrator Password

This article mainly introduces how to reset the administrator password if you forget it.

1. Prerequisites

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

The administrative tool requires entering the DataFlux Func container to operate.

2. Specific Procedures

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

The specific command is 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

Example of modification:

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

3. More Options

If there is a need for automated operations and maintenance, you can directly specify the administrator username and new password in the following way, 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={New Administrator 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. Administrative Tool admin-tool.py

For more detailed usage of the administrative tool, please refer to Deployment and Maintenance / Administrative Tools