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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-18-2004, 07:42 AM
|
#1
|
Member
Registered: Feb 2004
Location: Alpha Quadrant, sol system, earth, asia, Israel.
Distribution: Computer I : Slackware 9.1 ; Computer II : Windows XP
Posts: 144
Rep:
|
Cracking root password?
My brother is stupid and he lost his root password.
How do I run a bruteforce to crack it? (Fedora Core 1)
|
|
|
03-18-2004, 08:25 AM
|
#2
|
Member
Registered: Mar 2004
Location: Bxl Europe
Distribution: Debian/Ubuntu
Posts: 84
Rep:
|
I don't really know and it's hard to answer 'cos it may help any people to access any PC.
I suggst reinstall the partition in question.
Besides, someone says you start the pc with knoppix, mount the partition read/write. Go into shadow and find the encrypted pass and suppress the file. Normaly at boot there shouldn't be a pass for root. If you can do that you could have thought it yourself : )
If this work, you can put a pass for root you keep and an admin profile for your brother to take care of his daily tasks.
Marc A
|
|
|
03-18-2004, 08:49 AM
|
#3
|
Member
Registered: Feb 2004
Location: Alpha Quadrant, sol system, earth, asia, Israel.
Distribution: Computer I : Slackware 9.1 ; Computer II : Windows XP
Posts: 144
Original Poster
Rep:
|
It's his computer so I don't even care if he throws it off the roof. I'll tell him that he needs to reinstall Linux.
|
|
|
03-18-2004, 11:24 AM
|
#4
|
Member
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729
Rep:
|
He can boot up using knoppix and get access that way. I can not remember exactly how but it is not that difficult.
|
|
|
03-18-2004, 02:21 PM
|
#5
|
LQ Newbie
Registered: Mar 2004
Posts: 3
Rep:
|
another way
There is another way to do it, which is quite simple actually.
I don't remember the exact details but I've got it written down at the office.
If it's necessary, reply, and I'll post it.
|
|
|
03-18-2004, 02:31 PM
|
#6
|
Member
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683
Rep:
|
Boot into single user mode and change it.
If he is using GRUB I think he needs to hit 'a' then put a -S or 'single' at the end of the line.
(it won't tell him what his old one is but it will allow him to change to one he knows.)
Last edited by Blinker_Fluid; 03-18-2004 at 02:32 PM.
|
|
|
03-18-2004, 11:36 PM
|
#7
|
Member
Registered: May 2001
Posts: 125
Rep:
|
If you forgot you root you can also just boot with the fedora 1 cd.
Type "linux rescue" at the boot prompt.
once you get a shell type
chroot /mnt/sysimage
then type
passwd
reboot without the cd and you are good to go.
|
|
|
03-19-2004, 06:01 AM
|
#8
|
Member
Registered: Feb 2004
Posts: 66
Rep:
|
mr Blinker_Fluid ,
i also got the same problem before but reinstalled linux on my pc...
please try to explain me to change the password using grub clearly..
bye
|
|
|
03-20-2004, 02:26 AM
|
#9
|
LQ Newbie
Registered: Mar 2004
Location: Philippines
Distribution: Debian
Posts: 4
Rep:
|
Lost password
First, try single user. If you don't see either a LILO or GRUB boot screen, try hitting CTRL-X to get one. If it's LILO, just type "linux single" and that should do it (assuming that "linux" is the lilo label). If GRUB, hit 'e", then select the "kernel" line, hit "e" again, and add " single" (or just " 1") to the end of the line. Press ENTER, and then "b" to boot.
You should get a fairly normal looking boot sequence except that it terminates a little early at a bash prompt. If you get a "Give root password for system maintenance", this isn't going to work, so see the "init" version below.
If you do get the prompt, the / filesystem may not be mounted rw (although "mount" may say it is). Do
mount -o remount,rw /
If that doesn't work (it might not), just type "mount" to find out where "/" is mounted. Let's say it is on /dev/sda2. You'd then type:
mount -o remount,rw /dev/sda2
If you can do this, just type "passwd" once you are in and change it to whatever you like. Or just edit /etc/shadow to remove the password field: move to just beyond the first ":" and remove everything up to the next ":". With vi, that would be "/:" to move to the first ":", space bar once, then "d/:" and ENTER. You'll get a warning about changing a read-only file; that's normal. Before you do this, /etc/shadow might look like:
root:$1$8NFmV6tr$rT.INHxDBWn1VvU5gjGzi/:12209:0:99999:7:-1:-1:1074970543
bin:*:12187:0:99999:7:::
daemon:*:12187:0:99999:7:::
adm:*:12187:0:99999:7:::
and after, the first few lines should be:
root::12209:0:99999:7:-1:-1:1074970543
bin:*:12187:0:99999:7:::
daemon:*:12187:0:99999:7:::
adm:*:12187:0:99999:7:::
You'll need to force the write: with vi, ":wq!". (If that still doesn't work, you needed to do the -o remount,rw, see above).
Another trick is to add "init=/bin/bash" (LILO "linux init=/bin/bash" or add it to the Grub "kernel" line). This will dump you to a bash prompt much earlier than single user mode, and a lot less has been initialized, mounted, etc. You'll definitely need the "-o remount,rw" here. Also note that other filesystems aren't mounted at all, so you may need to mount them manually if you need them. Look in /etc/fstab for the device names.
=====================
Mark Vincent Verallo
|
|
|
03-20-2004, 10:35 PM
|
#10
|
Member
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683
Rep:
|
Quote:
Originally posted by naren
mr Blinker_Fluid ,
i also got the same problem before but reinstalled linux on my pc...
please try to explain me to change the password using grub clearly..
bye
|
step by step instructions:
Power on machine when you get to the grub screen where it is counting down and asking you to select the kernel you hit the 'a' key
this will drop you to a screen where you can modify kernel arguments add 'single' to the end of the line and press 'enter'
You will then boot into single user mode where you can type 'passwd root' and then enter a password you know.
Hope that helps
|
|
|
03-21-2004, 12:33 PM
|
#11
|
Member
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259
Rep:
|
Use this

|
|
|
03-21-2004, 11:20 PM
|
#12
|
Member
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429
Rep:
|
|
|
|
03-22-2004, 05:30 PM
|
#13
|
Member
Registered: May 2003
Distribution: Debian GNU/Linux 3.0 Sid, OpenBSD 3.5
Posts: 190
Rep:
|
A bruteforce of any 8 character or more password with john could take weeks. With a CRAY-2. 
|
|
|
All times are GMT -5. The time now is 07:11 PM.
|
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
|
|