View previous topic :: View next topic |
Author |
Message |
rosskevin n00b
Joined: 28 Feb 2003 Posts: 19 Location: Franklin, Tennessee USA
|
Posted: Thu Apr 17, 2003 7:15 pm Post subject: [security] lost root password. |
|
|
So I've done the unthinkable . Actually, my (production) gentoo box has been up so long and setup properly so I log in with my username, that I've just plain forgotten the root password.
Is it true that if I have physical access, that I can reset the password? Could someone point me to a doc or outline the procedure?
Thanks _________________ I'm just a java guy... |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Thu Apr 17, 2003 7:20 pm Post subject: |
|
|
boot from a rescue system, mount the hd, then edit /mnt/gentoo/etc/shadow and delete the password hash between the colons.
Then, reboot and login with the empty password. Assign a new password.
That's it |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Thu Apr 17, 2003 7:20 pm Post subject: |
|
|
If you get physical access to the box, then boot with Gentoo's LiveCD, mount the partitions, do the chroot thing, and then do passwd and set a new password.
There ya go _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Thu Apr 17, 2003 8:04 pm Post subject: |
|
|
If you boot to single user mode you become root without needing the password. Then use passwd to reset. _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
dermot Tux's lil' helper
Joined: 28 Mar 2003 Posts: 108 Location: Dublin, Ireland
|
Posted: Thu Apr 17, 2003 8:29 pm Post subject: |
|
|
And remember: sudo is your friend. _________________ Dermot
I bought some rock star ashes from the back of Rolling Stone
I don't think he would've minded - he couldn't sell his soul |
|
Back to top |
|
|
Vancouverite Apprentice
Joined: 28 Sep 2002 Posts: 162 Location: Vancouver, Canada
|
Posted: Fri Apr 18, 2003 8:10 am Post subject: |
|
|
Here is the procedure to reset roots password.
1) Append: init=/bin/bash to your kernel options by editing your bootloader entry and boot it. This will give you a root shell.
2) Remount / read/write with: mount -o remount,rw /
3) Set roots password with: passwd _________________ Screenshot |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Apr 18, 2003 12:43 pm Post subject: |
|
|
Fuck me. I think i'll be installing a grub password to stop that being able to happen.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
bsolar Bodhisattva
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Fri Apr 18, 2003 12:47 pm Post subject: |
|
|
puggy wrote: | Fuck me. I think i'll be installing a grub password to stop that being able to happen.
Puggy |
If you fear that, make sure to protect your BIOS and lock the case. And encrypt the FS... _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Fri Apr 18, 2003 12:51 pm Post subject: |
|
|
Don't forget to assign a BIOS password and to disable CD or Floppy booting (remove them entirely). BTW: The safest way is put the computer away, out of reach for anybody |
|
Back to top |
|
|
bsolar Bodhisattva
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Fri Apr 18, 2003 12:57 pm Post subject: |
|
|
compu-tom wrote: | Don't forget to assign a BIOS password and to disable CD or Floppy booting (remove them entirely). BTW: The safest way is put the computer away, out of reach for anybody |
Yeah, that was exaclty my point... _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
|
metacove Tux's lil' helper
Joined: 09 Apr 2003 Posts: 148
|
Posted: Fri Apr 18, 2003 1:32 pm Post subject: |
|
|
If it's 2.4.19 and below and you have a shell account you can use a ptrace exploit |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Apr 18, 2003 2:05 pm Post subject: |
|
|
Would encrypting the file system slow things down a lot due to encryption/de-cryption having to occur all the time?
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Vancouverite Apprentice
Joined: 28 Sep 2002 Posts: 162 Location: Vancouver, Canada
|
Posted: Fri Apr 18, 2003 9:21 pm Post subject: |
|
|
puggy wrote: | Would encrypting the file system slow things down a lot due to encryption/de-cryption having to occur all the time? |
Apparently not too much... the thread about this is here.
If you're really paranoid about security you should solder you keyboard connector onto your mother board to prevent a key catcher.
Encrypting your grub password with md5crypt at the grub shell is probably sufficient. _________________ Screenshot
Last edited by Vancouverite on Fri Apr 18, 2003 9:31 pm; edited 1 time in total |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Apr 18, 2003 9:26 pm Post subject: |
|
|
hmm. I seems the only way to be secure is put you computer in a big steel box to which only you have the key.
Cheers on the crypto thing. Ever since reading the cryptonomicon I've wanted to encrypt something for a reason.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
easykill Apprentice
Joined: 07 Dec 2002 Posts: 230
|
Posted: Fri Apr 18, 2003 10:15 pm Post subject: |
|
|
puggy wrote: | Would encrypting the file system slow things down a lot due to encryption/de-cryption having to occur all the time?
Puggy |
I have all my filesystems, and the swap encrypted. I notice very little slowdown...It is not going to matter much. That's the easiest way to describe it.
I also use grub password/BIOS password and have a physical lock on my case, heh. I don't really have a good reason to do this, but I do anyways. |
|
Back to top |
|
|
Orange n00b
Joined: 11 Apr 2003 Posts: 47
|
Posted: Fri Apr 18, 2003 11:00 pm Post subject: |
|
|
compu-tom wrote: | Don't forget to assign a BIOS password and to disable CD or Floppy booting (remove them entirely). BTW: The safest way is put the computer away, out of reach for anybody |
Or if you wanted to be really fancy you could put an electric shock on your computer when someone besides yourself atempts to use your computer they'll get a nice little shock... Of course I might be over stepping the bounds _________________ Gentoo is a learning experience |
|
Back to top |
|
|
Jeld Tux's lil' helper
Joined: 28 Jun 2002 Posts: 84 Location: NYC, US
|
Posted: Sat Apr 19, 2003 11:51 am Post subject: |
|
|
Being in the computer security business for a while, I can only say this. Rule #1 Client-side security doesn't work.
In this case, it means that if a person with malicious intent gets phisical access to the computer there is nothing you can do to stop him/her from accessing your data. The only thing you can do is make them sweat a lot while doing it.
To this there is a side note. You can make system secure emnough to be not worth breaking. For example, if you encrypt your file system using strong crypto, make a 4096 bit key to unlock it, store it on a keychain USB device and carry it with you at all times, a person who got access to your system will still be able to get to your data, but if the data consists of your collection of mp3s then the effort required to get to it will be much more then the data is worth, since it will involve either using supercomputers and teams of cryptographers or taking the USB device from your dead body
On the other side ( of the side note ) the more security measures you take to protect a system the more difficult your system becomes for regular use. One of the effects of tightening the computer security is that at some point of tightening it the security starts to actually weaken because of the human factor. For example, for security purposes, one can install kerberos, disable permanent passwords and issue a one-time password every time one logs in to the system, since password changes every login, the password security becomes very high until somebody starts writing his one time passwords on sticky notes since he/she cannot memorize a new password every day.
So, the moral of this narrative is, whatever you do you lose _________________ package JAPH;sub x{$/='$';@1=map{$_=ord;$_--;chr}
split//,<DATA>;@2=map{$_=ord;$_++;chr}split//
,<DATA>;$_=sub{$.++%2?shift@2:shift@1};bless$_;}
1;$x=JAPH->x;for(1..25){print&$x,;}__DATA__
Kt!ouf!fmIdf"$ts@ngqOq`jq |
|
Back to top |
|
|
rosskevin n00b
Joined: 28 Feb 2003 Posts: 19 Location: Franklin, Tennessee USA
|
Posted: Tue Jul 08, 2003 9:14 pm Post subject: Results: no su from ssh |
|
|
Quote: | If you get physical access to the box, then boot with Gentoo's LiveCD, mount the partitions, do the chroot thing, and then do passwd and set a new password. |
Ok, did the chroot on the box, changed the password. Here's the catch: I can su when on the box, but not when accessing the box via ssh? I think I forgot to umount, whatever I did, I screwed it up.
Any ideas? _________________ I'm just a java guy... |
|
Back to top |
|
|
karl420 Tux's lil' helper
Joined: 30 Nov 2002 Posts: 142 Location: Nashville, TN, US
|
Posted: Tue Jul 08, 2003 10:55 pm Post subject: |
|
|
You could su in ssh before? |
|
Back to top |
|
|
Deathwing00 Bodhisattva
Joined: 13 Jun 2003 Posts: 4087 Location: Dresden, Germany
|
Posted: Wed Jul 09, 2003 12:29 am Post subject: |
|
|
I have a more hacker idea (also totally inefficient!!!). Use john (johntheripper)... nice to go back to those nice times. |
|
Back to top |
|
|
rosskevin n00b
Joined: 28 Feb 2003 Posts: 19 Location: Franklin, Tennessee USA
|
Posted: Wed Jul 09, 2003 1:55 am Post subject: |
|
|
yes, I could su from ssh before. _________________ I'm just a java guy... |
|
Back to top |
|
|
karl420 Tux's lil' helper
Joined: 30 Nov 2002 Posts: 142 Location: Nashville, TN, US
|
Posted: Wed Jul 09, 2003 2:08 am Post subject: |
|
|
LOL, yeah jacktheripper and a big-a*s wordfile that took you 48 hours over a 14.4 modem to download!
Ah, the good old days.
Karl |
|
Back to top |
|
|
karl420 Tux's lil' helper
Joined: 30 Nov 2002 Posts: 142 Location: Nashville, TN, US
|
Posted: Wed Jul 09, 2003 2:10 am Post subject: |
|
|
Whoa, no kidding, you are from Franklin! WOW!
I live in Nashville, but I work in Franklin at Franklin Dishworks and Computer, as a computer technician, and sysadmin of a few unix boxen. If you ever want to come down and check the place out, give me an email! karl@stonedpenguin.com
Karl |
|
Back to top |
|
|
|