Skip to content

Deployment and Maintenance / Reset Admin Password

This article mainly introduces how to reset the admin password after you have forgotten it.

1. Prerequisites

To reset the system admin password, you need to be able to access the host where DataFlux Func is running or the running DataFlux Func container.

The admin tool requires you to enter the DataFlux Func container before you can operate.

2. Specific Operations

DataFlux Func provides the admin tool admin-tool.py. If you have forgotten the system admin password, you can use this admin 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 admin username (here is admin)
Enter new password for [admin]:                    # Specify the new admin password
Confirm new password:                              # Repeat the new admin password
Are you sure you want to do this? (yes/no): yes    # Enter yes to confirm the modification

3. More Options

If there is a need for automated operations and maintenance, you can use the following method to directly specify the admin username and new password, skipping the 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={admin username} --admin-password={new admin 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. Admin Tool admin-tool.py

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