Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: How to recover passwords

  1. #1
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    293

    Default 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
    Code:
    passwd: Module is unknown
    passed: password unchanged
    What should I do? Short of junking the whole machine.

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: How to recover passwords

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

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,578

    Default Re: How to recover passwords

    Quote Originally Posted by jpff View Post
    I tried chroot to the mounted disk system and ran passwd but
    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".

  4. #4
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    293

    Default Re: How to recover passwords

    Quote Originally Posted by gogalthorp View Post
    Well 13.3 to TW is a huge jump. Maybe try a clean install
    I must have mistyped/remembered -- it was the last 32bit system before Leap, upgraded in steps until stuck.

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,578

    Exclamation Re: How to recover passwords

    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>

    All is not lost -- you don't need to trash your system …

  6. #6
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    293

    Default Re: How to recover passwords

    Quote Originally Posted by dcurtisfra View Post
    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".
    "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

  7. #7
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    293

    Default Re: How to recover passwords

    Quote Originally Posted by dcurtisfra View Post
    SDB:Recover root password: <https://en.opensuse.org/SDB:Recover_root_password>.


    All is not lost -- you don't need to trash your system …
    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

  8. #8
    Join Date
    Sep 2012
    Posts
    7,104

    Default Re: How to recover passwords

    Quote Originally Posted by jpff View Post
    ran passwd but that says
    Code:
    passwd: Module is unknown
    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).

  9. #9
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    293

    Default Re: How to recover passwords

    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!

  10. #10
    Join Date
    Sep 2012
    Posts
    7,104

    Default Re: How to recover passwords

    Quote Originally Posted by jpff View Post
    All that remains of this is to ask what pam_unix2.so should be and where to get it
    pam_unix2 is deprecated and should not be used anymore. Use pam_unix.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •