LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2011, 07:35 AM   #1
mangotree
LQ Newbie
 
Registered: Oct 2010
Location: Indonesia
Distribution: Slackware
Posts: 13

Rep: Reputation: 3
Reset password without installation CD


Hi,
Is it possible to reset my root password without installation CD?I have been read some that it is possible by edit LILO, but i'm just not sure yet how to do that...by click TAB first on LILO?and what parameter should i append on?
Now i don't with my Slackware CD for in the next few days. Typos makes me lost root and my daily login simultaneously. If i reboot, i'll never login to my laptop-because there are only root and my login

So it's like i have just one shot to make it back to normal.Thanks
 
Old 04-22-2011, 09:01 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
I use GRUB not LILO, so I am not 100% sure. Try to enter "telinit 1" in your kernel line (or where LILO lets you enter text). If it does not work try "init 1".

Last edited by ChrisAbela; 04-22-2011 at 09:02 AM.
 
Old 04-22-2011, 09:12 AM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
the system will ask for root pass also on init 1.

In these situations I usually boot with the kernel parameter (when lilo is not password protected)
Code:
init=/bin/bash
then I remount the root filesystem read and write (booting this way you got it mounted read-only), supposing is /dev/sda1
Code:
mount -o remount,rw /dev/sda1 /
issue a
Code:
passwd
then
Code:
sync
mount -o remount,ro /dev/sda1 /
and ctrl-alt-del to reboot.
 
1 members found this post helpful.
Old 04-22-2011, 09:25 AM   #4
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Another option is to boot with your Slackware DVD, mount your hard disk root partition and chroot in it:

e.g.

mount /dev/sda1 /mnt
chroot /mnt
passwd
 
1 members found this post helpful.
Old 04-22-2011, 10:08 AM   #5
mangotree
LQ Newbie
 
Registered: Oct 2010
Location: Indonesia
Distribution: Slackware
Posts: 13

Original Poster
Rep: Reputation: 3
Hi,

Done by type linux single init=/bin/bash rw at LILO prompt

with linux single i still asked for root password
with linux init=/bin/bash it said password unchanged cannot lock /etc/shadow

Thanks

Last edited by mangotree; 04-22-2011 at 10:11 AM.
 
3 members found this post helpful.
Old 02-25-2012, 12:36 PM   #6
fietser
Member
 
Registered: Feb 2006
Location: Nederland
Distribution: slackware
Posts: 47

Rep: Reputation: 7
Quote:
Originally Posted by mangotree View Post
Hi,

Done by type linux single init=/bin/bash rw at LILO prompt
and passwd

Great.
Thank you.

Lost password for my old Laptop.
 
1 members found this post helpful.
Old 01-22-2023, 09:53 AM   #7
coolinout61
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Rep: Reputation: Disabled
Addendum (poss for newer kernels)

Quote:
Originally Posted by fietser View Post
and passwd

Great.
Thank you.

Lost password for my old Laptop.
Quote:
Originally Posted by mangotree View Post
Hi,

Done by type linux single init=/bin/bash rw at LILO prompt

with linux single i still asked for root password
with linux init=/bin/bash it said password unchanged cannot lock /etc/shadow

Thanks
passwd didn't work here, for me, but editing /etc/passwd to remove root pw did.

hth
 
Old 01-22-2023, 08:38 PM   #8
lakis70
Member
 
Registered: Jan 2021
Location: Athens Greece
Distribution: slackware puppylinux
Posts: 46

Rep: Reputation: Disabled
i have 2 boot options
1 the normal
2 with ramdisk for situations like this
 
1 members found this post helpful.
Old 01-26-2023, 12:32 AM   #9
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 370

Rep: Reputation: Disabled
Ha! This shows you how old I am... I thought we were still storing password hashes in /etc/passwd!
 
Old 01-26-2023, 01:59 AM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Ant bootable Slackware device will suffice if you just chroot in to your Main. This works whether Optical, USB, or HDD install of any similar architecture Slackware install. Not only dfo I have Install media but also several versions of Liveslak USB drives and always create a pristine backup system immediately after the Main install. I trust in "Six ways From Sunday" options. Fixing LILO with chroot is almost trivial.
 
  


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
How to reset password ? vibinlakshman Ubuntu 15 07-08-2012 09:13 AM
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
reset password duki Linux - Newbie 5 09-05-2007 04:12 AM
Password reset hongman Linux - Newbie 2 07-11-2005 05:46 AM
reset the password ust Linux - General 1 02-11-2004 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:42 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