Password change bug

Impossible to change password.
Last Whonix for KVM.

I assume your user account password in Whonix-Workstation? The standard procedure for any Debian machine should work because e don’t change anything related to it.

Just test it.

sudo su
changeme

passwd
new_password
new_password
Program said: password changed

su user

sudo su
new_password
Wrong password!
new_password
Wrong password!
new_password
Wrong password!

sudo su
changeme
You is root!

Let’s have a look at what’s happening:

sudo asks for your user password and runs su as root. su changes your current user to be root (su doesn’t ask for a password again as it’s executed as root).

this will change your root password as you are root right now.

changes to the user user (you could also enter exit to leave the session as root, no password asked for su because you are root right now)

sudo asks again for your user password which is still changeme as you’ve changed only the root password. (if you enter just su without sudo you will be asked for your new root password)


The solution for your problem: just execute “passwd” as user or “passwd user” as root.

See also the corresponding wiki entry: Post-installation Security Advice

3 Likes

sudo su
password of user?
absurd!

If you enter the command sudo su it even tells you:

[sudo] password for user:

If you have any more problem regarding sudo or su I’d recommend asking your favorite search engine or finding a better place to ask general Linux questions as this is neither Whonix nor Whonix-KVM specific. Manpages (man sudo, man su or man passwd) are usually pretty good as well.

3 Likes