Steps to regain access
Having forgotten my password I need to get access.
I tried the following set of instructions without success. Can someone tell me where the instructions are not working and why and how to fix? 1. Power on the PC 2. Boot the Installation CD. 3. Press: Enter-Key when asked about keymap 4. Login as: root 5. Now you are superuser! TO DO IT: 6. If lacking which partition on which root resides, type fdisk -l and check what is on each partition. Presuming it is on /dev/sda2 for arguement sake. 7. mkdir test <OK> 8. mount /dev/sda2 test # Mount the root partition to a directory ???Why What purpose? [pwd showed test dir is on /, i.e. root] 9. chroot test # Change root directory to test <Doesn't work> ???why not working?? cuz of #8?? 10. vi /etc/shadow # <?OK> 11. Note the root:<encryption number>:<ID>:0::::: 12. Delete ONLY the encryption number or replace it with: "" or blank or * ?Tried all, unless ? above a fixed this is not working 13. :wq Saves and closes the shadow file. 14.?umount test #?? Seems to be working but unsure 15. Take the LiveCD from the DVD/CD player 16. Reboot system. 17. Enter the slackware login as root with blank password also tried "", "*" 18. Change the password(s) with passwd 19. finish ^^ 17 and on didn't work obviously, THANX appreciated! My notes are with "?". |
No need to mess with the installation CD. Believe or not, usually is enough to append on boot, to lilo entry command line:
Code:
Linux init=/bin/bash When the boot process finalize, you are directly logged in as root and you can reset your password or even mess with the system as you wish. BUT, before that, you should execute: Code:
mount -n -o remount,rw / |
Not sure where the "Linux" should be entered?? Is there a "boot" prompt somewhere I dont recall. Probably cuz I don't have it handy to check right now.
What is the mount command, what does it do and when? Would prefer to follow my notes if I can get them corrected, but thanks anyway will check later. |
Quote:
Try editing /test/etc/password and just remove the 'x' in the second field. I haven't done this for decades but I believe that should work. Once this is done I don't believe any edit is necessary for shadow. No need for chroot. |
Quote:
But to go to your original post, why didn't the chroot work? What errors did you get? If you did indeed mount your root partition, and that partition contained the required files, it should've been a nonevent to chroot. So, since it didn't work, I'm curious what your error was. That could give us the info to give you an idea on how to solve this. Your steps seem to be right. You should be able to boot the installer, mount the root partition, chroot the root partition, then run passwd for the root user (which would be the default user). Then reboot the system and you should have root access with the new password. |
Let me try to clarify what the process you try to follow does:
Steps 1-5: Booting the system using the boot CD gives you a prompt - keep in mind the the / directory you login resides at is not your hard disk's one but the one created in memory by the boot CD. As a result altering any file would have absolutely to impact to your installed system. What you need to do is mount your disk and change YOUR files. Steps 6-8: Mount your root partition as the test dir. now you can see and change your files. Keep in mind that your files reside in /test. for example your passwd file is : /test/etc/passwd. At this point my advice is to break with that process and do the following (I'm reusing where necessary) : Quote:
Delete ONLY the encryption number or replace it with: "" or blank or * :wq Saves and closes the shadow file. Quote:
Reboot system. Enter the slackware login as root with blank password also tried "", "*" Change the password(s) with passwd finish |
All times are GMT -5. The time now is 01:49 AM. |