How to recover passwords

My 32bit laptop is new to tumbleweed having been upgraded from 13.3 and I am having many problems

The current real stopper is that it will not accept the password for 3 different users (that is all users) just saying it is incorrect – and it is not. I was using it OKish on Monday last, but failed Wednesday boot

I managed to get the rescue CD burnt and can boot from it but what next? I tried chroot to the mounted disk system and ran passwd but that says


passwd: Module is unknown
passed: password unchanged

What should I do? Short of junking the whole machine.

Well 13.3 to TW is a huge jump. Maybe try a clean install

When you run ‘passwd’ from the rescue system, you’re executing as the user “root” within the rescue system and, it’s not possibly to change THAT user’s password.

Assuming that, everything is pointing to the target disk and the “etc/passwd” and “/etc/shadow” and “/etc/pam.d/passwd” files then, you’ll have to execute ‘passwd’ with the [LOGIN] parameter.

You can check if the rescue system ‘passwd’ is in fact pointing to the broken system directories by executing “passwd --status --all” or “passwd -S -a”.

I must have mistyped/remembered – it was the last 32bit system before Leap, upgraded in steps until stuck.

SDB:Recover root password: <https://en.opensuse.org/SDB:Recover_root_password>.
INIT or /bin/bash mode: Another trick is to add “init=/bin/bash” (LILO “linux init=/bin/bash” or add it to the Grub “kernel” line). This will dump you to a bash prompt much earlier than single user mode, and a lot less has been initialised, mounted, etc. You’ll definitely need the “-o remount,rw” here. Also note that other filesystems aren’t mounted at all, so you may need to mount them manually if you need them. Look in /etc/fstab for the device names.

Also this one: SDB:Rescue system on disk: <https://en.opensuse.org/SDB:Rescue_system_on_disk>
[HR][/HR]All is not lost – you don’t need to trash your system …

“passwd -R /mnt -a -S” showed the correct users but “passwd -R /mnt jpff” gave the same message about module unknown

I am not convinced that the password files have changed; I am suspecting something worse as I used wifi to upgrade but cannot get wifi on Tumbleweed

Thak you for that link – not found it myself

Still no progress though. I added the mount -o bind lines and it made no difference. Trying to introduce a new user now to see if that works… no it does not so it is not the passwd file per se but its use/non-use

Looks like a dead end

This comes from PAM. What is content of /etc/pam.d/passwd? It likely only has several “include some-other-file” in which case show also content of these included files (they are located under /etc/pam.d as well).

Thanks for the pointer to /etc/pam.d

I checked the includes and found that pam_unix2.so was required but missing from /lib/security

As an experiment I copied pam_unix.co to pam_unix2.so and now I can log in as me. Unfortunately I messed the root password in my thrashing about, but can now reset with the rescue disk

All that remains of this is to ask what pam_unix2.so should be and where to get it, and I can return to why the WiFi does not work!

pam_unix2 is deprecated and should not be used anymore. Use pam_unix.

So why is it used in common-account, common-account-pc, common-auth, common-auth-pc, common-password, common-password-pc, common-session and common-session-pc as well as backups?

How did you upgrade to Tumbleweed ?

On which distribution and version?

Online from last 32 bit opensuse. That worked apart from no wifi. (See other thread onupdade). Since upgrade one attempt to learn to use zypper dup after which could not log in

My 2 cents: perform a clean install. The kind of instability described in this thread gives me the impression that the initial upgrade hasn’t gone well. If the system is completely TW, zypper dup should work fine as an upgrade mechanism.
Another thing: are you sure the laptop is 32bit only ? I’ve experienced that a lot of people think they have 32bit hardware, since the hardware came with a 32bit Windows. Haven’t seen any real 32bit laptops for years. Can you post output of

lscpu

? Like with most distros, the 32bit era is coming to an end.

Yes I am sure. This is an IBM Thinkpad X40 with a Pemtum M at 1.4GHz, one core reported a i686 32 bit, purchased July 2005.

Lovely machine; great keyboard; awkward shaped disk

That leaves me with $0.01 : clean install.

Theoretically pam-config update should have replaced pam_unix2 with pam_unix. Actually it should do it on every update. It is hard to tell what happened without knowing exact state before and detailed logs. One could try running “pam-config --update --debug” - may be it gives some hint. Wild guess is that configuration was modified outside of pam-config.