LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-25-2004, 10:05 PM   #1
Adrian13
LQ Newbie
 
Registered: Oct 2004
Distribution: SUse 9.x
Posts: 13

Rep: Reputation: 0
lost root´s password on SuSE 9.0


confused: Hi, hope you can help me, i lost the root´s password, what can i do?

thanks
 
Old 11-25-2004, 10:19 PM   #2
bru
Member
 
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132

Rep: Reputation: 15
If you can boot up into single user mode. this will auto log you into the root account, then you can

passwd

and then change the password
 
Old 11-25-2004, 10:20 PM   #3
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
At the lilo (or grub or whatever) prompt, add a 1 to the end of the kernel arguments and boot as normal. This will throw you into singel user mode. Some distros require the root password to enter init 1 though (as they should).

Failing that, get the ISO for a "run from the CD Linux" and mount up your root filesystem. Edit /etc/shadow and remove the string of text between the first two colons. Example:

Code:
root:$1$XoDoJk95$abDO$$/mBTgSVu4hi.:0:0::0:0:Charlie &:/root:/bin/csh
    ^    Remove This Part          ^
then reboot and change root's password to anything you like.

Note: the above is from a DragonFly machine, and Linux differs slightly, but it's the same basic operation.

HTH

Last edited by sigsegv; 11-25-2004 at 10:21 PM.
 
Old 11-25-2004, 10:26 PM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
Quote:
Failing that, get the ISO for a "run from the CD Linux" and mount up your root filesystem. Edit /etc/shadow and remove the string of text between the first two colons. Example:

code:

root:$1$XoDoJk95$abDO$$/mBTgSVu4hi.:0:0::0:0:Charlie &:/root:/bin/csh
^ Remove This Part ^



then reboot and change root's password to anything you like.

Note: the above is from a DragonFly machine, and Linux differs slightly, but it's the same basic operation.
Instead of removing that, it would be safer if you replace it with one of the users part and use user's password to login as root.
 
Old 11-25-2004, 10:38 PM   #5
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by perfect_circle
Instead of removing that, it would be safer if you replace it with one of the users part and use user's password to login as root.
The poster can't log in as root as it is. If you're down to hand editing shadow, it's not really possible to make the situation with the root account any worse.
 
Old 11-25-2004, 11:01 PM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
that's not true.
I can think of a worse situation.
deleting the shadow file
 
Old 11-26-2004, 01:01 AM   #7
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by perfect_circle
that's not true.
I can think of a worse situation.
deleting the shadow file
That would indeed do it, but if you delete the file by editing it, you shouldn't have been there in the first place.

My point was that if you're playing about in shadow, adding a the password field from another account isn't any safer than just deleting the offending password field all together.
 
Old 11-26-2004, 01:37 AM   #8
Sridhar Kumar K
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: RHL 9
Posts: 6

Rep: Reputation: 0
quote:
-------------------------------------------------------------------------------------------------------
get the ISO for a "run from the CD Linux" and mount up your root filesystem.
-------------------------------------------------------------------------------------------------------

Iam a newbie. I didn't get this point. Can some one explain what this means. Will this work for any Distr. of Linux or only for SuSE.

Thanks,
Sridhar.
 
Old 11-26-2004, 02:43 AM   #9
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
in any distro, i think the cd gives you an option to boot in rescue mode.
it runs a small linux version in the memory and mounts your actual root partition (/) under something
like /mnt/sysimage. This way it gives you the opportunity to access your partitions and fix whatever problem you may have
 
Old 11-26-2004, 06:40 AM   #10
blubbfish
LQ Newbie
 
Registered: Feb 2004
Posts: 29

Rep: Reputation: 15
if you boot from your first suse 9.x cd you have to choose manual installation in the following dialog boxes you can choose what you like to boot and here you can tell him to boot a rescue system --> thats the way you want to go .... voila you have your rescue system now mount the root partition and do as described before ;_)
 
Old 11-26-2004, 09:52 PM   #11
Adrian13
LQ Newbie
 
Registered: Oct 2004
Distribution: SUse 9.x
Posts: 13

Original Poster
Rep: Reputation: 0
root´s password recovery didn't work

hi people, sorry as you may have noticed i´m kind of new at this
as to the info you sent, it did't work or i probably couldnt make it work
(the problem is i lost the roots password on SuSE 9.0)

a little fisher price help will be appreciated
thanks
 
Old 11-27-2004, 12:44 AM   #12
rabeea
Member
 
Registered: Aug 2004
Location: Pakistan
Posts: 52

Rep: Reputation: 15
hi All,

leave this booting from cd idea

Even u can go to single mode using ur OS.

For Lilo: Boot into ur linux text mode using CTrl+x and write "linux single" command and when u get teh prompt enter passwd command
 
Old 11-27-2004, 12:46 AM   #13
rabeea
Member
 
Registered: Aug 2004
Location: Pakistan
Posts: 52

Rep: Reputation: 15
For Grub:
On boot screen selecting linux press 'e' tp eidt that boot
then again press 'e' and write 'linux single' or 'init 1' and then press 'b'.It will take u to shell and enter passwd command .Rest ur root password.

thnx
 
Old 11-27-2004, 01:06 AM   #14
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
rabeea -- Your instructions just repeat what's already been said, and in that spirit, I'll repeat myself.

What you propose will only be of use if the system doesn't require root's password for single user access. If it does, then you're no better off than you started ... not to mention, your instructions by themselves have a low [read: next to nill] chance of working. Very few distros use "linux" for the kernel image name anymore.

Having said that ...

Adrian13 -- here's a page that describes the correct way to boot into single user mode from grub.

Here's one page that describes resetting the root password, and here's another.

Not sure if they qualify for "Fisher Price" help or not, but they're more verbose than I. Try them out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
root password is lost!!! :( alaios Linux - General 3 11-07-2005 05:48 AM
Lost root password zillah Solaris / OpenSolaris 10 05-24-2005 05:28 PM
Lost Suse 8.0 Root Password 12jewels Suse/Novell 3 03-31-2005 02:58 PM
lost root password lightningcount Linux - Newbie 9 08-19-2004 06:25 PM
Lost My root password !!! hitesh_linux Linux - General 33 04-14-2003 08:32 AM


All times are GMT -5. The time now is 05:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration