LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-15-2009, 10:36 PM   #1
akkikaushik
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
Unhappy 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!!!!!
 
Old 11-15-2009, 11:24 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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.
 
Old 11-22-2009, 12:48 AM   #3
akkik
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
Unhappy live cd details

from where can i buy live cd.
can i purchase already build lfs system.,if yes then from where and how?
 
Old 11-22-2009, 12:58 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by akkik View Post
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.
 
Old 11-22-2009, 12:58 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 10-31-2014, 03:39 PM   #6
basan46
Member
 
Registered: Oct 2014
Posts: 35

Rep: Reputation: Disabled
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.
 
Old 10-31-2014, 03:50 PM   #7
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
basan46

Create a new thread pls, sorry dose this regard passwd?
 
Old 10-31-2014, 04:01 PM   #8
basan46
Member
 
Registered: Oct 2014
Posts: 35

Rep: Reputation: Disabled
hello,
yea i followed this procedure after i forgot my passwd and trying to follow the above steps from a live cd
 
Old 10-31-2014, 04:04 PM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
Old 10-31-2014, 04:21 PM   #10
basan46
Member
 
Registered: Oct 2014
Posts: 35

Rep: Reputation: Disabled
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
 
Old 10-31-2014, 04:22 PM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
How long was it, can you make it longer?
 
Old 10-31-2014, 04:28 PM   #12
basan46
Member
 
Registered: Oct 2014
Posts: 35

Rep: Reputation: Disabled
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:/#
 
Old 10-31-2014, 04:33 PM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Is that defernetly your lfs install?

Before you chrooted in did you make sure "lfs" was set 1st export LFS=/mnt/lfs?
 
Old 10-31-2014, 04:39 PM   #14
basan46
Member
 
Registered: Oct 2014
Posts: 35

Rep: Reputation: Disabled
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
 
Old 10-31-2014, 04:47 PM   #15
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The system forgot the root password trainee Slackware 3 05-17-2009 04:51 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
Help! Forgot Password matrix13 Linux - General 9 02-06-2007 09:13 AM
forgot password =( ?!?! j_miguel_y Linux - General 1 08-31-2004 11:58 AM
forgot my password ? i can change the password JrLz Linux - Security 9 04-06-2004 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration