first things first:
- to my knowledge, openHAB needs the password stored in mqtt.cfg, there’s currently no way to use a passwd-file
- of course you can use a broker configuration without authentification (and openHAB can use that broker also)
with changing all that mqtt-configuration on-the-fly you almost certainly ran into a bug, please have a look here:
if clearing /var/lib/openhab2/cache
and /var/lib/openhab2/tmp
won’t work, you should have a look in
/var/lib/openhab2/config/org/openhab/mqtt.config
it should contain the same info (e.g. no credentials), if not, do as in the “Clear the Cache”-thread described and stop OH2, delete cache and tmp again but plus delete mqtt.config (or change accordingly), then start OH2 again