Can't login at all after reset root password

Hi !
I just installed OpenSUSE leap (I forgot the version) for the first time.
I had to reinstall it after I, seemingly, uninstalled the graphical session. I think I forgot to configure the root password the second time, I tried to do it from an early shell with those steps :
On grub editing the first command to add “init=/bin/bash”
Starting openSUSE with it
In the opened terminal, type mount -no remount,rw / and then passwd root.
Power off and on the computer.
(I just figured right now this is way to overkill for setting a root password when I had session with root privileges, duh)
The thing is I can’t login anymore, as root or as any user. What do I do ?

Password reset can be done by booting something else, then chrooting into the installed system and running the passwd command.

I did that (using passwd) when I first lost the root password, but I ended up being unable to login as any user. I used passwd again for each user which didn’t change anything. I reinstalled the system at the end. Thanks for answering !

The version is important in this case.

Prior to Leap 16.0, you had to create a root user, or at least implicitly let YaST create it for you, optionally with the password of your normal user account. And you needed the root password for any sudo command.

Now, with Leap 16.0, a root account is optional, and the first normal user account is special: It is added to the wheel user group, and sudo is set up to grant you root permissions with your normal user account.

If you installed with the new Agama installer, your Leap version is 16.0:


If it was the old YaST installer, your Leap version is 15.6 or older:

Root account is not optional and system will fall apart without it. What you probably mean - password for the root account is optional. I do not know whether Agama locks root user (like Ubuntu does) but then it should have been unlocked when its password was changed. I suspect something else happened to the OP system, but now all evidences are lost.

Yes, of course; the root password is optional, the account still exists. But without it, the root account is not usable for any user.

It most certainly is usable via sudo because Agama always installs sudo-policy-wheel-auth-self package and adds the first user to the wheel group.

Since you seem curious : the version was Leap 16.0.