It is great to see your interest in MQTT and HiveMQ broker, welcome to the community!
In order to help you please share which version of HiveMQ broker you use, which extension you use for client authentication, and your configs. Please make it clear which exact special character you use.
Please specify the exact command that you used to generate the hash sum for the password present in the config.xml that you have shared.
Please specify in which OS (Windows, Linux, MacOS) and shell (bash, zsh, sh, cmd, PowerShell) the command has been executed.
You indicated that you have an issue with a special character in your password. What was that special character and what was the exact command that you used?
You know that some special characters are also treated as special characters by the shell, so it is important how you escape those characters in the userpassword string and which quotation marks you use.
CMD shell in Linux is rather unusual. Perhaps you are using The Windows Subsystem for Linux (WSL)? Please add a screenshot with your command and its output.
Hi! Using HiveMQ Control Center 4.22.0 - I have verified that the SHA hash for the password is correct, but when I add new users to the config.xml file I still cannot log in to the Control Center with these users. The error is “Wrong username or password”
I have checked the config file on the machines - it is deployed correctly and has these users/hashed passwords in the section.
What might be the problem here?
Thank you for getting in touch. Could you kindly provide your config.xml file for review? Additionally, it would be appreciated if you could specify the exact command you used to generate the hash sum for the password. Moreover, please indicate the operating system (Windows, Linux, MacOS) and shell (bash, zsh, sh, cmd, PowerShell) in which the command was executed.
Regarding the special character you mentioned, could you please specify which special character is included in the password, and its position within the password string? This information will help us ensure that the hashing process is correctly accounting for any special characters and rule out potential issues related to their presence or placement.
For example, if your username is username and the password is password$123, the hash would be generated using:
echo -n 'usernamepassword$123' | shasum -a 256
Understanding the specifics of the special character will assist in troubleshooting and resolving the login issue.
As mentioned by Dasha, the process involves creating a password hash using a combination of the username and password. The command you initially shared uses only the password, which is why it is encountering issues.
Kindly consider using the following command for generating the hash and then incorporate the hash into the HiveMQ config.xml file for user3:
#echo -n "user3=}k+ph@X}K4VeW5aaS" | shasum -a 256
1d385549b9b411420185127f8672a7652c6045c703c143671f469af47e34a830 -
Please retry the process with the updated command, and if you encounter any further challenges or have additional questions, feel free to reach out. We are here to assist you.