LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-16-2002, 05:00 AM   #1
baburaj
LQ Newbie
 
Registered: Feb 2002
Location: india
Posts: 4

Rep: Reputation: 0
Question root passwd


hi,,


if i forgot my root passwd, by chance, is the only option left is a complete formatting of my disk and reinstall linux ?
 
Old 04-16-2002, 05:17 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
No, it isn't. Use a boot disk, edit /etc/shadow and delete everything beteen root: and :
It''s a good idea to make a backup copy of this file before editing.
 
Old 04-16-2002, 05:35 AM   #3
reed
LQ Newbie
 
Registered: Mar 2002
Location: D.C. Area
Distribution: Rh 7.2
Posts: 25

Rep: Reputation: 15
if yo use LILO or grub you can boot to single user mode then change your password as well.
 
Old 04-16-2002, 06:36 AM   #4
L33t_H4x0R
LQ Newbie
 
Registered: Apr 2002
Distribution: Mandrake 9.0 (at the moment)
Posts: 28

Rep: Reputation: 15
.... which (in LILO) you do by pushing TAB to see the list of bootable kernels - typing in the name of the one at the top (The default one you usually use normally) followed by a space, and then the word 'single' (no quotes, make sure it's lowercase)....

Good luck!

Bry
 
Old 04-16-2002, 06:41 AM   #5
Eternal
Member
 
Registered: Feb 2002
Location: Austria
Distribution: LFS based opon debian or course
Posts: 38

Rep: Reputation: 15
heh

lilo: image-name init=/bin/sh -o rw

should do the trick. it will start to boot and stop on bin/sh after mounting the medias in Read-Write. IF you boot into a Single you get 2 choises :

Ctrl+D for normal Boot up or
Enter Root password for maintenance

(im a flamebait please bow infront of my knowledge)
 
Old 04-16-2002, 06:50 AM   #6
L33t_H4x0R
LQ Newbie
 
Registered: Apr 2002
Distribution: Mandrake 9.0 (at the moment)
Posts: 28

Rep: Reputation: 15
Damn!

You're completely correct of course - it does indeed ask for root password when you try and boot into single user mode!

The /bin/sh trick is a much better idea!

Top man!


Bry
 
Old 04-16-2002, 07:02 AM   #7
Eternal
Member
 
Registered: Feb 2002
Location: Austria
Distribution: LFS based opon debian or course
Posts: 38

Rep: Reputation: 15
As reward, i accept 19yrs old sisters. Please e-mail her in the closest delayes to oliver@nerdzland.com

Sincerly, Oliver
 
Old 04-16-2002, 12:59 PM   #8
reed
LQ Newbie
 
Registered: Mar 2002
Location: D.C. Area
Distribution: Rh 7.2
Posts: 25

Rep: Reputation: 15
in grub

p #if you assigned a password (and didn't forget it)
enter password: <password>

e #to edit menu
more choices
e #to edit menu
#add space and single to the default kernel image line
#something like
/boot/vmlinuz_your_kern single
enter #...
b #boots
#voila single user mode with no root pass

get grubby
RIP LIL_ <disclaimer
^^^^^^^^personal opinion
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
forgot root passwd sanu Linux - Newbie 1 09-20-2004 04:45 AM
root passwd and username latika.gk Linux - Newbie 3 05-26-2003 06:24 AM
root passwd Prasanth Linux - General 0 03-17-2003 05:12 AM
root passwd sparks Linux - Newbie 5 06-16-2002 07:25 AM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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