本地安装Thingsboard后无法登录:寻求正确登录凭据帮助
Hey there! Let's work through your login problem step by step—missing default credentials can be tricky, but we’ve got a few solid paths to fix this.
First: Verify Default Credentials by Role
You tried the tenant admin pair, but let’s make sure you’re using the right combination for your intended role. ThingsBoard ships with three default user profiles:
- System Administrator: Email
sysadmin@thingsboard.org, passwordsysadmin(this has full platform access) - Tenant Administrator: Email
tenant@thingsboard.org, passwordtenant(the one you tried—if this failed, your setup might have overridden defaults) - Customer User: Email
customer@thingsboard.org, passwordcustomer
Pro tip: Don’t forget to select the matching role from the dropdown on the login page! Mixing up the role and credentials is a super common slip-up.
If Defaults Aren’t Working: Check for Customized Credentials
If the standard pairs won’t log you in, your local installation might have modified the default credentials during setup. Here’s how to check based on how you installed ThingsBoard:
Binary Installation (Linux/Windows)
- Locate the
thingsboard.ymlconfig file:- On Linux, it’s usually in
/etc/thingsboard/ - On Windows, look in the
conf/folder of your ThingsBoard installation directory
- On Linux, it’s usually in
- Open the file and search for the
security: defaultCredentials:section. This will list any custom email/password pairs set during setup—use those values to log in.
Docker Installation
- If you used Docker, check if you passed environment variables to override defaults when starting the container. Key variables to look for:
TB_EMAIL_SYS_ADMIN/TB_PASSWORD_SYS_ADMINTB_EMAIL_TENANT_ADMIN/TB_PASSWORD_TENANT_ADMIN
- Inspect your running container’s environment with this command:
Scan the output for the credential variables—those will be your valid login details.docker inspect <your-thingsboard-container-name> | grep -A 10 "Env"
Reset Credentials as a Last Resort
If you can’t track down the existing credentials, you can reset the system admin password using ThingsBoard’s built-in tool:
For Binary Installations
Run this command in your terminal:
sudo thingsboard.sh resetpw sysadmin@thingsboard.org your-new-password
For Docker Installations
Run this command, replacing placeholders with your container name and desired password:
docker exec -it <your-thingsboard-container-name> thingsboard.sh resetpw sysadmin@thingsboard.org your-new-password
After running this, use the email sysadmin@thingsboard.org and your new password to log in as the system admin—from there, you can manage other user accounts as needed.
内容的提问来源于stack exchange,提问作者explorateur

