Lost my user name and password for Mosquitto server

Hi to all,

I installed Home Assistant years ago and I have not needed a login for the mosquitto broker since that time. I either changed the password or maybe I add an ssh key. (because I see core-ssh login:) In either case, I think I have lost this function and I was going to use it because I wanted to give access to ESPresence for room presence detection. I don’t mind reinstalling the mosquitto broker, but if I then reinstall Home Assistant from a backup, will it leave my new login alone or will it over-write it with my old one?

Thanks for any advice you can give me.

Sam

The username and password should be visible in the MQTT reconfigure config button. settings/devices/mqtt

I was in the seme boat yesterday but found settings there that worked.

Not anymore… it shows now this:

if using the add-on, you can just create an extra HA user (user, not person) to be used in mosquitto.

+1 does anybody has a way to recover the default mqtt password? Without creating a new user

I don’t use the internal MQTT broker but from memory isn’t the username/password set up the same as your HA one by default?

Had this problem last night that you can no longer view it. I had the MQTT explorer add on installed and it was saved and viewable in there.

Made sure to save it else where now as I may have just gotten lucky.

1 Like

No, by default it uses the username homeassistant and gives a long string as password, usually to see that password you just go to the Devices, MQTT, Configure, Reconfigure and the you where able to see the password, that changed with the 2024.5 Update, now we can’t see that password

Yeah I discovered this today this seems like a very stupid thing to implement but just like everything else with HA it just seems like a bunch of wasted time with no result trying to get stuff to work correctly…

1 Like

Yeah starting from scratch with mqtt didn’t fix it now the password set on the devices is preventing them from connecting this is a major bug that needs to be addressed. I created a bug request to the home assistant team.

Revering to previous backup I was able to retrieve the password. I will be skipping next few updates to hopefully bypass this issue currently on the following hope this helps someone.

  • Core2024.4.4
  • Supervisor2024.05.1
  • Operating System12.3
  • Frontend20240404.2

Losing your password is a bug ?

4 Likes

I went the same route, used the backup from before the update to retrieve the password.

Is not that we lost the password, is a password that we had saved in HA and then suddenly it was remove

1 Like

Use the Vs code or terminal plugin to open /config/.storage/core.config_entries
you should see an entry similar to this one

12 Likes

Just to add here… before you go opening files in .storage, make sure you have a very recent backup available.

Accidentally modifying files in .storage could break your HA instance VERY EASILY.

2 Likes

This doesn’t work anymore; the entries show the password from whatever was set in the integration.

Thankfully I kept a backup of an old install, was able to delete mqtt integration and re-add it then go to the directory to get the password