locked out of linux

This is a discussion on locked out of linux within the Linux Security forums, part of the System Security and Security Related category; On Thu, 15 Jan 2004 21:39:41 -0800, Si wrote: > before we went on holiday, my girlfriend changed ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-15-2004
nunya
 
Posts: n/a
Default Re: locked out of linux

On Thu, 15 Jan 2004 21:39:41 -0800, Si wrote:

> before we went on holiday, my girlfriend changed her login on her
> laptop (fedora)... now we're back, she's forgotten what she changed it
> to, and has long since forgotten the root password...
>
> where do we go from here?
>
> is the easiest thing to do to retrieve the files stored in the linux
> partitions then reinstall over the top?
>
> or, how do i beat it?
>
> obviously a step by step walkthrough would be nice (and unexpected)..
> otherwise some pointers would be good...
>
> it's fedora on a dual boot (with win xp, which she does have access
> to) sony vaio.....
>
> so.. ideas?
>
> thanks for your time folks

1. Boot with your choice of Linux startup disc
2. mount the filesystem
3. chroot into it
4. passwd (for root)
5. passwd <username> -m -G <groups> -s /bin/bash
6. shutdown -r now
7. Remove disc you booted from
8. Watch system boot into your Linux installation
9. Login when asked at the prompt using the passwd you set above
10. HAVE FUN
--
The M$ warcry:
Quantity is no substitute for quality, but it's the only one we've got.
Reply With Quote
  #2 (permalink)  
Old 01-16-2004
Si
 
Posts: n/a
Default locked out of linux

before we went on holiday, my girlfriend changed her login on her
laptop (fedora)... now we're back, she's forgotten what she changed it
to, and has long since forgotten the root password...

where do we go from here?

is the easiest thing to do to retrieve the files stored in the linux
partitions then reinstall over the top?

or, how do i beat it?

obviously a step by step walkthrough would be nice (and unexpected)..
otherwise some pointers would be good...

it's fedora on a dual boot (with win xp, which she does have access
to) sony vaio.....

so.. ideas?

thanks for your time folks
Reply With Quote
  #3 (permalink)  
Old 01-16-2004
Bit Twister
 
Posts: n/a
Default Re: locked out of linux

On 15 Jan 2004 21:39:41 -0800, Si wrote:
> before we went on holiday, my girlfriend changed her login on her
> laptop (fedora)... now we're back, she's forgotten what she changed it
> to, and has long since forgotten the root password...
>
> where do we go from here?


http://groups.google.com/advanced_group_search
google_single_password_search1_tag
alt.os.linux.mandrake in the Newsgroup box, pick English


Mandrake rescue mode on cd 1
Hit F1 key
rescue
mount your partitions under /mnt (down arrows, tab, enter)
enter
Go to console (down arrows, tab, enter)
chroot /mnt
passwd root

----------------- using grub ----------------------
When at the grub menu

Hit e to get to the edit mode
You should be on the Kernel line containing /vmlinuz
Hit e again and add a
space single
to the end of line and hit Enter key. Example:
kernel (hd0,4)/vmlinuz 1 root=/dev/hda9 mem=128M single
then b to boot

You then come to the sh-nnn# prompt.

When you "exit" the system will continue booting.

---------------- using lilo -----------------------

Hit Esc or Tab key at lilo prompt then

linux 1 or linux single




If you think your box has been cracked, look here
http://groups.google.com/advanced_group_search

google_tag_cracked_4_next_time in the first box
alt.os.linux in the Newsgroup box, pick English


Reply With Quote
  #4 (permalink)  
Old 01-17-2004
Emmanuele Bassi
 
Posts: n/a
Default Re: locked out of linux

* Si [2004-01-16 06:39]:

> where do we go from here?


Haven't been using a Mandrake for many years, now, but if it still boots
using LILO, you might as well try this:

1. type:
linux init=/bin/sh
on LILO prompt (it could require pressing Tab first)

2. mount root rw:
mount -o remount=rw /

3. launch passwd, and type the new root's password.

Bye,
Emmanuele.

--
Emmanuele Bassi | [ http://www.emmanuelebassi.net ]
emmanuele.bassi(at)iol.it | Linux User #170621, http://counter.li.org
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738 08BD 8ECC DB8F A432 0FF4
Reply With Quote
  #5 (permalink)  
Old 01-17-2004
Chuck Bridgeland
 
Posts: n/a
Default Re: locked out of linux

On 15 Jan 2004 21:39:41 -0800, Si <google@spudlington.cjb.net> wrote:

> before we went on holiday, my girlfriend changed her login on her
> laptop (fedora)... now we're back, she's forgotten what she changed it
> to, and has long since forgotten the root password...
>
> where do we go from here?


How I'd do it, if I couldn't boot single user:

Get one of those 2.5" to 3.5" drive adapter things. Take the hard drive out
of the laptop. Connect it as a second drive on a Linux box. Mount the
partition on the laptop's drive that has /etc to a temporary mount point.
Edit /etc/passwd and /etc/shadow or overwrite them with appropriate
replacements.


--
"Changes have been made to critical system components. You must die
and be reborn for changes to take effect."
Chuck Bridgeland, chuckbri at computerdyn dot com
http://www.essex1.com/people/chuckbri
Reply With Quote
  #6 (permalink)  
Old 01-17-2004
Nico Kadel-Garcia
 
Posts: n/a
Default Re: locked out of linux


"Chuck Bridgeland" <gn32900@news-central.giganews.com> wrote in message
news:slrnc0hdkg.v8.gn32900@lennier.chuckbri.org...
> On 15 Jan 2004 21:39:41 -0800, Si <google@spudlington.cjb.net> wrote:
>
> > before we went on holiday, my girlfriend changed her login on her
> > laptop (fedora)... now we're back, she's forgotten what she changed it
> > to, and has long since forgotten the root password...
> >
> > where do we go from here?

>
> How I'd do it, if I couldn't boot single user:
>
> Get one of those 2.5" to 3.5" drive adapter things. Take the hard drive

out
> of the laptop. Connect it as a second drive on a Linux box. Mount the
> partition on the laptop's drive that has /etc to a temporary mount point.
> Edit /etc/passwd and /etc/shadow or overwrite them with appropriate
> replacements.


Goodness, that's the hard way. It's most useful if the system is entirely
screwed and cannot be booted into single user.

To boot into single user, since Fedora uses the "grub" bootloader, you can
usually hit "e" at the boot-time selection of boot modes, and edit that to
select run level 1. (Look it up on Google.). If the grub bootloader is
locked, you can usually boot with a a floppy or CD and boot into "rescue"
mode, mount the drive's root partition, do a "chroot" to that mounted
partition, then force the password to be changed.

If grub is locked and the BIOS is locked, then you need to take the drive
out or break into it via other means.


Reply With Quote
  #7 (permalink)  
Old 01-19-2004
Nils Petter Vaskinn
 
Posts: n/a
Default Re: locked out of linux

On Fri, 16 Jan 2004 23:49:24 -0500, Nico Kadel-Garcia wrote:

> If grub is locked and the BIOS is locked, then you need to take the drive
> out or break into it via other means.


But it 's less work to open the case to get at the cmos-battery than to
open it to move the drive. Unless a system is unable to boot from CD (or
floppy) there's no reason to actually move the drive. (except if the bios
is setup in a special way and moving the drive is easier than backing up
the bios setup)

--
NPV

"the large print giveth, and the small print taketh away"
Tom Waits - Step right up

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0