Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[security] lost root password.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rosskevin
n00b
n00b


Joined: 28 Feb 2003
Posts: 19
Location: Franklin, Tennessee USA

PostPosted: Thu Apr 17, 2003 7:15 pm    Post subject: [security] lost root password. Reply with quote

So I've done the unthinkable 8O . 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
View user's profile Send private message
compu-tom
Guru
Guru


Joined: 09 Jan 2003
Posts: 415
Location: Berlin, Germany

PostPosted: Thu Apr 17, 2003 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Thu Apr 17, 2003 7:20 pm    Post subject: Reply with 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.

There ya go :wink:
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Thu Apr 17, 2003 8:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
dermot
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2003
Posts: 108
Location: Dublin, Ireland

PostPosted: Thu Apr 17, 2003 8:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vancouverite
Apprentice
Apprentice


Joined: 28 Sep 2002
Posts: 162
Location: Vancouver, Canada

PostPosted: Fri Apr 18, 2003 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Apr 18, 2003 12:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Fri Apr 18, 2003 12:47 pm    Post subject: Reply with quote

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... :roll:
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
compu-tom
Guru
Guru


Joined: 09 Jan 2003
Posts: 415
Location: Berlin, Germany

PostPosted: Fri Apr 18, 2003 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Fri Apr 18, 2003 12:57 pm    Post subject: Reply with quote

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... :wink:
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
metacove
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2003
Posts: 148

PostPosted: Fri Apr 18, 2003 1:32 pm    Post subject: Reply with quote

If it's 2.4.19 and below and you have a shell account you can use a ptrace exploit :D
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Apr 18, 2003 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vancouverite
Apprentice
Apprentice


Joined: 28 Sep 2002
Posts: 162
Location: Vancouver, Canada

PostPosted: Fri Apr 18, 2003 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Apr 18, 2003 9:26 pm    Post subject: Reply with quote

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. :-D

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
View user's profile Send private message
easykill
Apprentice
Apprentice


Joined: 07 Dec 2002
Posts: 230

PostPosted: Fri Apr 18, 2003 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Orange
n00b
n00b


Joined: 11 Apr 2003
Posts: 47

PostPosted: Fri Apr 18, 2003 11:00 pm    Post subject: Reply with quote

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 :twisted:
_________________
Gentoo is a learning experience
Back to top
View user's profile Send private message
Jeld
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2002
Posts: 84
Location: NYC, US

PostPosted: Sat Apr 19, 2003 11:51 am    Post subject: Reply with quote

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 :twisted:

On the other side ( of the side note :P ) 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 :lol:
_________________
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
View user's profile Send private message
rosskevin
n00b
n00b


Joined: 28 Feb 2003
Posts: 19
Location: Franklin, Tennessee USA

PostPosted: Tue Jul 08, 2003 9:14 pm    Post subject: Results: no su from ssh Reply with quote

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
View user's profile Send private message
karl420
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2002
Posts: 142
Location: Nashville, TN, US

PostPosted: Tue Jul 08, 2003 10:55 pm    Post subject: Reply with quote

You could su in ssh before?
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Wed Jul 09, 2003 12:29 am    Post subject: Reply with quote

I have a more hacker idea (also totally inefficient!!!). Use john (johntheripper)... nice to go back to those nice times. :cry:
Back to top
View user's profile Send private message
rosskevin
n00b
n00b


Joined: 28 Feb 2003
Posts: 19
Location: Franklin, Tennessee USA

PostPosted: Wed Jul 09, 2003 1:55 am    Post subject: Reply with quote

yes, I could su from ssh before.
_________________
I'm just a java guy...
Back to top
View user's profile Send private message
karl420
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2002
Posts: 142
Location: Nashville, TN, US

PostPosted: Wed Jul 09, 2003 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message
karl420
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2002
Posts: 142
Location: Nashville, TN, US

PostPosted: Wed Jul 09, 2003 2:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum