forgot my lfs system password..what to do now?
i made lfs system it was working well..i tried to login after 6 months ..but the problem is that i forgot my password..what should be done now to loggin.
is there anyway to login? will this lfs system work again? plz help!!!!! |
I don't know LFS, but if you are using grub (and you probably are), you can simply pass an 'S' kernel option in to get to single-user mode. Reset root's password from there.
If you've set a grub password, and don't know that either, then you're going to need a live cd to do the job. |
live cd details
from where can i buy live cd.
can i purchase already build lfs system.,if yes then from where and how? |
Quote:
|
Hello,
You can download any LiveCD from the internet, there's no real need to buy one. Then you can boot from the LiveCD and chroot into the harddisk environment and change the root password. Next, reboot and voila, up and running. Once booted from LiveCD do this: Code:
mkdir /mnt/tmp Code:
passwd Kind regards, Eric |
hello,
my lfs is on sda5. i get an error /mnt/tmp is not a block device when i do mount /mnt/tmp /dev/sda5. please help. I am sooo close to booting my lfs. |
basan46
Create a new thread pls, sorry dose this regard passwd? |
hello,
yea i followed this procedure after i forgot my passwd and trying to follow the above steps from a live cd |
Ok mount /dev/sda5 back on /mnt/lfs,
then follow the http://www.linuxfromscratch.org/lfs/...06/kernfs.html 6.2.2 and 6.2.3 then chroot in http://www.linuxfromscratch.org/lfs/...sedchroot.html Code:
passwd root |
When I do passwd root, it tells password too short and then password changed without providing me with an option to enter my new passwd
|
How long was it, can you make it longer?
|
1 sec.
root:/# passwd root Changing password for root Enter the new password (minimum of 5 characters) Please use a combination of upper and lower case letters and numbers. Bad password: too short. Warning: weak password (enter it again to use it anyway). passwd: password changed. root:/# |
Is that defernetly your lfs install?
Before you chrooted in did you make sure "lfs" was set 1st export LFS=/mnt/lfs? |
I followed these steps..
Mount /mnt/lfs /dev/sda5 Then all the steps in 6.2.2 and 6.2.3 which includes an export to LFS. Then I chroot to it. Then type passed root and I got the above output |
I would umount everything again reboot, then as root on host
export LFS=/mnt/lfs echo $LFS then follow the post #9 before changing passwd just make sure you have chrooted into lfs |
Can u please answer with bit more details regarding umount and checking whether chrooted into LFS. Coz I really don't want to mess up more
|
just reboot your host system then chroot in,
In lfs / you will have a sources dir so that will be lfs |
Now, I rebooted and set LFS and chroot. I get failed to run command usr/bin/env. No such file ore directory.
|
did you mount /dev/sdXX to /mnt/lfs
|
Mount /dev/sda5 /mnt/lfs right ?
|
yes
And echo $LFS |
Quote:
Code:
mount /dev/sda5 /mnt/lfs |
I successfully reset the password, now I'm not able to login after boot
Login - lfs ( guessing its default, otherwise I don't remember giving a login name ) Password - the one I set now |
you can check whether you chrooted or not by running 'mount' command.
Just type 'mount' without any options. It will show you mounted filesystems. Check its output for string that starts with "/dev/sda5 on / type..." If you have it in 'mount' output it means you are chrooted. |
I observed this while my previous password was set, I typed my password in the login name to check. And it was printing z instead of z.
Note - that was my previous passwd |
If you can login as root now you can change lfs user passwd the same way
as root passwd lfs "Hi Keith" |
Hi spike didn't miss much by the looks of it
|
I still have trouble logging in..
|
Quote:
|
I successfully reset the password, now I'm not able to login after boot
Login - lfs ( guessing its default, otherwise I don't remember giving a login name ) Password - the one I set now I observed this while my previous password was set, I typed my password in the login name to check. And it was printing z instead of z. Note - that was my previous passwd |
See the other thread. All is made clear there.
|
Assuming you trying to log in as "lfs" user using root password (that one you had changed recently).
Boot your system. When you will be asked for login, type "root" and hit Enter key. Being asked for password, type the password you had changed recently. Press Enter key. If you successfully logged in, run this command: Code:
ls -l /home Code:
passwd lfs I'm wondering how did you install LFS if you even can't log in and reset password? |
Quote:
Quote:
|
Quote:
My assumption is he could create user account and that is why I suggested to check /home directory. Nobody knows for sure whether he has user account or not (including OP itself since he tries to log in). Once he forgot a password he could forgot a user as well, isn't it? So ls /home is just a test for user existence. And yes, thanks for remembering about chroot, I just forgot that my system built in the same way... :D |
Quote:
Quote:
|
All times are GMT -5. The time now is 07:44 PM. |