recovering/resetting root password. ?

This is a discussion on recovering/resetting root password. ? within the Linux Security forums, part of the System Security and Security Related category; hi, my query refers to recovering/reseting the 'root' password ? is there any way to do the same without restarting ...


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 12-06-2004
DukeNM
 
Posts: n/a
Default recovering/resetting root password. ?

hi,

my query refers to recovering/reseting the 'root' password ?

is there any way to do the same without restarting the OS.

any soln either related to solaris or linux would do.
Reply With Quote
  #2 (permalink)  
Old 12-06-2004
CJT
 
Posts: n/a
Default Re: recovering/resetting root password. ?

DukeNM wrote:
> hi,
>
> my query refers to recovering/reseting the 'root' password ?
>
> is there any way to do the same without restarting the OS.
>
> any soln either related to solaris or linux would do.


Without restarting the OS?? That's a somewhat unusual request.

It depends on how you're managing passwords. I'll assume the
simplest case --

As long as you're already logged on as root, you can probably
edit /etc/shadow and delete the current munged password.

--
The e-mail address in our reply-to line is reversed in an attempt to
minimize spam. Our true address is of the form che...@prodigy.net.
Reply With Quote
  #3 (permalink)  
Old 12-06-2004
CJT
 
Posts: n/a
Default Re: recovering/resetting root password. ?

DukeNM wrote:
> hi,
>
> my query refers to recovering/reseting the 'root' password ?
>
> is there any way to do the same without restarting the OS.
>
> any soln either related to solaris or linux would do.


BTW, if you know the root password already, it's easy. Just log
in as root and change it. My other answer assumed you don't know
the root password.

--
The e-mail address in our reply-to line is reversed in an attempt to
minimize spam. Our true address is of the form che...@prodigy.net.
Reply With Quote
  #4 (permalink)  
Old 12-06-2004
Bill Unruh
 
Posts: n/a
Default Re: recovering/resetting root password. ?

tridentadm@softhome.net (DukeNM) writes:

]hi,

]my query refers to recovering/reseting the 'root' password ?

]is there any way to do the same without restarting the OS.

]any soln either related to solaris or linux would do.

Which is it?
You cannot recover it. You can reset it but only by rebooting.

Reply With Quote
  #5 (permalink)  
Old 12-06-2004
Juha Laiho
 
Posts: n/a
Default Re: recovering/resetting root password. ?

CJT <abujlehc@prodigy.net> said:
>DukeNM wrote:
>> my query refers to recovering/reseting the 'root' password ?


>As long as you're already logged on as root, you can probably
>edit /etc/shadow and delete the current munged password.


Why hand-edit? 'passwd' doesn't ask for current password when the
invoking user is root -- so as long as you're already root, you can
change the password without knowing what it previously was.

Without being root, boot the system to maintenance/single user mode
(provided that it isn't set up to ask for root password when entering
single-user mode), and change the password.

If the system asks for root password upon entering single-user mode,
boot from recovery media, mount the root filesystem manually, and
edit the root password entry in the etc/shadow file (note the relative
path; it'll be within the directory in which you mounted the real root
filesystem).
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Reply With Quote
  #6 (permalink)  
Old 12-06-2004
Tim Haynes
 
Posts: n/a
Default Re: recovering/resetting root password. ?

Juha Laiho <Juha.Laiho@iki.fi> writes:

[snip]
> If the system asks for root password upon entering single-user mode, boot
> from recovery media, mount the root filesystem manually, and edit the
> root password entry in the etc/shadow file


Ach, nah. Assert an init=/bin/sh on the end of the kernel boot parameter
line. Just remember to `mount -o rw,remount /' as well...

~Tim
--
Another day, |piglet@stirfried.vegetable.org.uk
Another apt-get dist-upgrade |http://pig.sty.nu/Pictures/gallery/
Reply With Quote
  #7 (permalink)  
Old 12-06-2004
Madhusudhanan Chandrasekaran
 
Posts: n/a
Default Re: recovering/resetting root password. ?

Hi,
Resetting your root password can be done by using the passwd command.
You could always recover a forgotten/lost root password with the help of
rescue disk. There are other ways too. This is an interesting link you
might want to see.
http://linuxgazette.net/107/tomar.html
~Madhu
DukeNM wrote:
> hi,
>
> my query refers to recovering/reseting the 'root' password ?
>
> is there any way to do the same without restarting the OS.
>
> any soln either related to solaris or linux would do.

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 01:37 PM.


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