LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 02-06-2007, 06:27 AM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 125

Rep: Reputation: 25
Help! Forgot Password


I forgot the root password of my system. I cannot think of reinstalling it. I have a lot of data in it. I dont have a DVD writer. So i cannot write the whole data. Is there any way to get my root password back. I am using a debian based system. please help...
 
Old 02-06-2007, 06:52 AM   #2
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 359

Rep: Reputation: 29
its bed to forget root

boot the sysetm with your bootable cd and and change the root password from there. if you have no password on the bootloader too. hope this will help.

thanks
 
Old 02-06-2007, 07:01 AM   #3
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 8,992

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
You can also try to boot in single user mode. Some systems do not ask for password. At the boot prompt just type "linux single" or "linux 1" depending of the boot loader installed.
 
Old 02-06-2007, 07:02 AM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
1. Boot up in rescue mode from your installation cd, or a boot floppy
2. Mount the / partition of your hdd
3. Backup, then edit the <mountpoint>/etc/passwd file. You need to delete all characters (probably just an "x") between the first and second ":" characters on the line starting with "root" in that file
4. Reboot, and you should be able to login as root without any password
5. Specify a new password for root

Last edited by J_Szucs; 02-06-2007 at 07:16 AM.
 
Old 02-06-2007, 07:05 AM   #5
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 125

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by colucix
You can also try to boot in single user mode. Some systems do not ask for password. At the boot prompt just type "linux single" or "linux 1" depending of the boot loader installed.
my boot loader is GRUB.
where can i enter the cammand you just said...
 
Old 02-06-2007, 07:08 AM   #6
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 213

Rep: Reputation: 35
And now you have all the tools to really screw around with a system that is not yours.

For the future, write the root password next to the machine. Especially if you are the only one using this computer. Better that than to screw around with the permissions of root on your system.
 
Old 02-06-2007, 07:09 AM   #7
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
Moved: This thread is more suitable in Linux General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 02-06-2007, 07:21 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: back to Arch
Posts: 16,659

Rep: Reputation: 425Reputation: 425Reputation: 425Reputation: 425Reputation: 425
Quote:
Originally Posted by matrix13
my boot loader is GRUB.
where can i enter the cammand you just said...
When GRUB comes up with the menu, you hit any key to put it in command-line mode. Then you have the option of editing the boot commands. I actually think that you simply add "single" to the kernel line.

but, booting from the install disk or from any "live CD" disk is the surefire way to get back into your system.
 
Old 02-06-2007, 07:43 AM   #9
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
"my boot loader is GRUB.
where can i enter the cammand you just said..."

On the grub boot options prompt.

But, if your system is SuSE, then it will not work, as SuSE will not allow you to login into single user mode without a valid root password.

It is better to find a cd you can boot up from. Any installation cd, live cd or even a single-floppy linux like tomsrtbt might do that gives you a command prompt; and then edit your passwd file on your hdd as I described above.

Last edited by J_Szucs; 02-06-2007 at 07:51 AM.
 
Old 02-06-2007, 09:13 AM   #10
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 2,635

Rep: Reputation: 47
You can bypass password by adding init=/bin/bash after single.
 
  


Reply

Tags
matrix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Forgot my Password khattaking Solaris / OpenSolaris 2 07-20-2006 12:33 PM
forgot my password navaladi Linux - Newbie 2 12-22-2004 08:47 AM
what to do when forgot your password? isamitch Linux - General 11 07-23-2004 01:57 PM
forgot my password ? i can change the password JrLz Linux - Security 9 04-06-2004 07:36 PM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration