I have forgotten my password in OH3

Hi.

Is it a way out of this?

ROS

You can use the openhab:users changePassword command on the Console to change it. :slight_smile:

openhab> openhab:users --help
Usage: openhab:users list - lists all users
Usage: openhab:users add <userId> <password> <role> - adds a new user with the specified role
Usage: openhab:users remove <userId> - removes the given user
Usage: openhab:users changePassword <userId> <newPassword> - changes the password of a user
Usage: openhab:users listApiTokens - lists the API tokens for all users
Usage: openhab:users addApiToken <userId> <tokenName> <scope> - adds a new API token on behalf of the specified user for the specified scope
Usage: openhab:users rmApiToken <userId> <tokenName> - removes (revokes) the specified API token
Usage: openhab:users clearSessions <userId> - clear the refresh tokens associated with the user (will sign the user out of all sessions)
1 Like

Hi there,

I have a similar problem. I can still login using ssh but not on the GUI via browser. It wont accept my password / username. I guess I must have a typo in it but I am unable to restore / remember the original words.
Is there an an option to see via the SSH connection the user that I had set up via the browser? I do not even remember the username (8

Thanks a lot!

Just use this command:

1 Like

… in the karaf console

1 Like

Thanks for the quick reply.
When I put in “openhab:users list” it returns
“-bash: openhab:users: command not found”

You need to enter the command in the karaf console not in the shell console.
after ssh’ing to your pi: openhab-cli console
then run the previous mentioned command.

1 Like

Thank you so much, problem solved.
Just one more question,
why are there two separate command consoles?

1 Like

one is the linux standard shell console for linux shell commands the other one is the ‘low level’ interface of the OH service/application ( karaf console ).
More information can be found e.g. at The Console | openHAB

1 Like