LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   forgot my lfs system password..what to do now? (https://www.linuxquestions.org/questions/linux-from-scratch-13/forgot-my-lfs-system-password-what-to-do-now-769370/)

akkikaushik 11-15-2009 10:36 PM

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!!!!!

anomie 11-15-2009 11:24 PM

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.

akkik 11-22-2009 12:48 AM

live cd details
 
from where can i buy live cd.
can i purchase already build lfs system.,if yes then from where and how?

catkin 11-22-2009 12:58 AM

Quote:

Originally Posted by akkik (Post 3765419)
from where can i buy live cd.
can i purchase already build lfs system.,if yes then from where and how?

Please start your own thread. It is confusing when there is more than one subject in a thread. For your question it will help if you say which country you are in.

EricTRA 11-22-2009 12:58 AM

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
mount /mnt/tmp /dev/sda1              <<< the partition that contains your LFS
mount --bind /dev /mnt/tmp/dev
mount -t proc none /mnt/tmp/proc
chroot /mnt/bin/bash

Now you've chrooted into a bash shell of your LFS system and can run
Code:

passwd
to reset the password.

Kind regards,

Eric

basan46 10-31-2014 03:39 PM

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.

spiky0011 10-31-2014 03:50 PM

basan46

Create a new thread pls, sorry dose this regard passwd?

basan46 10-31-2014 04:01 PM

hello,
yea i followed this procedure after i forgot my passwd and trying to follow the above steps from a live cd

spiky0011 10-31-2014 04:04 PM

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
if reseting root password

basan46 10-31-2014 04:21 PM

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

spiky0011 10-31-2014 04:22 PM

How long was it, can you make it longer?

basan46 10-31-2014 04:28 PM

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:/#

spiky0011 10-31-2014 04:33 PM

Is that defernetly your lfs install?

Before you chrooted in did you make sure "lfs" was set 1st export LFS=/mnt/lfs?

basan46 10-31-2014 04:39 PM

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

spiky0011 10-31-2014 04:47 PM

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


All times are GMT -5. The time now is 11:51 PM.