Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-07-2005, 11:03 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2005
Posts: 11
Rep:
|
Recovering Linux Password.
Hi,
I changed my linux root password. But now I can't remember the new password and I can't do any aministrative tasks.
But I still have my normal user account. Is there a way that I can recover my root password or will I have to reinstall linux again.
Best regards,
chamal.
|
|
|
|
02-07-2005, 12:20 PM
|
#2
|
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
AFAIK you can do it 3 ways:
-you remember the password
-try to crack the password file with something like Jack the Ripper
-easily change it if you have a rescue disk like Knoppix
See which one suits you best and let us know. Anyway, maybe somebody has other suggestions.
|
|
|
|
02-07-2005, 12:32 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2005
Location: TN
Distribution: aix,sco,redhat,xp,server2003
Posts: 9
Rep:
|
try this
this is what i do . hope it helps.
On an x86 system using GRUB as the boot loader, use the following steps to boot into single-user mode:
1.
If you have a GRUB password configured, type p and enter the password.
2.
Select Red Hat Enterprise Linux with the version of the kernel that you wish to boot and type a to append the line.
3.
Go to the end of the line and type single as a separate word (press the [Spacebar] and then type single). Press [Enter] to exit edit mode.
4.
Back at the GRUB screen, type b to boot into single-user mode.
then passwd root
and change it.
|
|
|
|
02-10-2005, 10:30 AM
|
#4
|
|
Member
Registered: Aug 2004
Posts: 43
Rep:
|
this is real easy!
step 1
download a iso of KNOPPIX distro of linux
step 2
burn it on cd
step 3
boot from cd
step 4
when o.s. is loaded open command shell
step 5
type in commandshell : su
now you a root users
step 6
in commandshell: mkdir /mnt/temp
step 7
typ in commandshell: fdisk -l /dev/hda
now take a look to see what is you / harddisk
step 8
in commandshell: mount /dev/hd* /mnt/test ( where * is your / as listed in fdisk -l /dev/hda)
step 9
vi /mnt/test/etc/passwd
step 10
delete the password line from the root to nothing
step 11
reboot and your done
|
|
|
|
02-10-2005, 10:45 AM
|
#5
|
|
LQ Newbie
Registered: Jan 2005
Posts: 11
Original Poster
Rep:
|
Thanks a lot guys
Hi people,
Thanks a lot for your help. It really was very useful.
I was planning to reinstall linux, But your advice saved me a lot of time and from trouble.
Best regards,
Chamal.
Last edited by chamalsl; 02-10-2005 at 10:47 AM.
|
|
|
|
02-10-2005, 01:18 PM
|
#6
|
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
It can be done in only 3 steps using Knoppix:
1.'mount -t ext3 /dev/hdN /mnt/hdN'
2.'chroot /mnt/hdN /bin/bash'
3.'passwd root'
where hdN is the partition where '/' is mounted.
That's all.
|
|
|
|
02-14-2005, 11:16 AM
|
#7
|
|
LQ Newbie
Registered: Feb 2005
Posts: 12
Rep:
|
if u dont have grub password set it is very easy
step 1
when the grub loads just click on the linux o.s and press
"e" for edit
step 2
go the line
kernel ....................
press enter
at the end of line leave a single space and type single
step 3
go back to the grub
and load
u will get
sh# passwd root
and change the password
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:39 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|