Openhabian 2.5.7-1 changing password

After installing openhabian 2.5.7 on my PI, I couldn’t change the password - the “sudo passwd” method suggested in the help window made me enter the new password twice, but when I restarted the default password “openhabian” was requested.
Only the input: “sudo passwd openhabian” saved the new password!
Changing the text in the help window would be very helpful for beginners like me!
Otherwise, many thanks to all developers and helpers in the community

Glad you got it working!

I don’t know anything about the help window you’re referencing, but for future reference you can change passwords via openhabian-config.

Drilling down to some old linux knowledge lets me think:

sudo passwd

starts passwd on behalf of root and is going to change root’s password.

sudo passwd openhabian

starts passwd on behalf of root to change the password of the user openhabian

passwd

starts passwd on behalf of the current user to change the password of the current user

Being lazy i prefer the the last variant.

So i’m not that surprised. Like Russ i wonder about the reference to “help window”. Maybe you mean the message box you get when exiting openhabian-config while still using the standard password. But that message does not tell anything about using “sudo” at my site. Just “passwd”.

There’s no help text in the current code to contain “sudo passwd” so show the exact message please, and explain when you received it.
It’s like @yab replied. “sudo passwd” will change the root user’s password, and both, “passwd” and “sudo passwd openhabian” will change the user openhabian’s password.

1 Like

I apologize for my inaccurate statement!
Yes, I mean the window that appears after using openhabian-config.
The mistake is clearly in my ignorance of the UNIX structure
My entry:

openhabian @ HomeServer: ~ $ sudo passwd
[sudo] password for openhabian:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Based on the output, I thought that the password for the openhabian user had to be changed, but that was not the case! Somewhere during my research on the net I found the command “sudo passwd openhabian” and I was able to change the password.
The error was in the “sudo”, which obviously only works with “passwd openhabian”.
As I said, the mistake lies in my insufficient knowledge!
Many thanks to everyone who helped my ignorance

sudo = switch user & do
if no user specified, root is assumed

A lot of unix commands needs “root” rights to be used (not too different from windows administrator). sudo looks up, if current user is allowed to become root, if yes asks for current users password and makes her/him root. So the following command is issued as root. Right are gone after this command. Issuing an other "sudo " in a defined time frame doesn’t ask for current users password again, though.

If you are going to use openhabian for a while, you should learn a bit about this. You will need “sudo” quite often. So just google for “sudo”. :wink:

Tanks for informations and help!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.