Reseting Root password in SuSE 8.2
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Reseting Root password in SuSE 8.2

  1. #1
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696

    Reseting Root password in SuSE 8.2

    Hi all,

    Due to a fast ball in work Ive just started using SuSE again today after about a year of not using it, hence I cant remember my root password.

    A friend of mine has told me how to do it but he isnt very well know for, shall we say, giving reliable IT advice, here is what he told me to do, I was just wondering if anyone could tell me if it is correct or if it willl trash my system!

    " Boot into rescue mode from the Inst. CD's
    Type:
    cd /etc
    vi passwd

    Go down to root line

    root:x: o : o :root:/root:/bin/bash

    Delete the X after root

    Press ESC wq

    vi shadow

    delete everything so it look like

    root ::::

    Esc wq

    Restart then enter new password"


    Does anyone know if this is correct?

    I would prob just go ahead and do it but i need this up and runnning for monday morning and really dont want to spend all sunday having to reinstall it again!!

    Thanks for any help guys/gals!
    Drugs have taught an entire generation of kids the metric system.

    http://tazforum.**********.com/

  2. #2
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Location
    Washington D.C. area
    Posts
    2,884
    If you can boot into single user mode then simply do so and use the passwd util and presto, reset password. Typically this will work when you boot into rescue mode too.

    Of course you should disable this little backdoor as part of your hardening process.
    Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
    Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

  3. #3
    Banned
    Join Date
    Jul 2005
    Posts
    511
    If this would work, I would consider it a security breach. I don't know the answer but I am really interested in this. (Since I want to experiment with SuSE in the near future...)

  4. #4
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696
    (Since I want to experiment with SuSE in the near future...) Top tip, write your root password down in big letters on a big yellow post-it note and stick it on your monitor so you will never ever forget it!


    Thanks horse, certainly a lot simpler than the way I was told!!
    Drugs have taught an entire generation of kids the metric system.

    http://tazforum.**********.com/

  5. #5
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696
    I tried it your way horse and it was addamant that I didnt have the right permissions to do it!

    So I tried it the way my friend suggested, it was going good untill i tried to exit from the vi passwd bit by pressing ESC wq, no matter how many times i pressed it it was not about to let me exit, so in desperation I pressed CTL ALT DEL and it told me it was killing a few services and then restarted, I had hoped it might have saved my edited passwd file but it didnt!

    Any other suggestions???

    Thanks!
    Drugs have taught an entire generation of kids the metric system.

    http://tazforum.**********.com/

  6. #6
    Senior Member
    Join Date
    Dec 2003
    Location
    Pacific Northwest
    Posts
    1,675
    Nokia,

    Here's the whole routine. The other guy left some pieces out near the end.

    At least he could have listed the source

    Source

    cheers

    edit:

    Little vi help:

    ZZ- saves the current changes to the file and exit from vi

    :wq - same as ZZ

    :q - quits the current file - works only if you don't have any unsaved files

    :q! - quits the current file and don't save the changes you made.
    Connection refused, try again later.

  7. #7
    Banned
    Join Date
    Jul 2005
    Posts
    511
    Originally posted here by Nokia
    (Since I want to experiment with SuSE in the near future...) Top tip, write your root password down in big letters on a big yellow post-it note and stick it on your monitor so you will never ever forget it!
    Actually, I do write down all my passwords, in a little notebook that I keep close to my computer. This I need because I use lots of different passwords for everything.
    Btw, the passwords that I've written down do have one or more characters too many. There is a simple pattern in it but if you don't know the pattern, you can't determine the real passwords from what I've written down.
    Writing down a password might not be a good idea but neither is using the same password over and over again. And while I have a pretty good memory, by now I have about 40 different passwords to remember. And at least it allows me to 'remember' them for years.

  8. #8
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696
    Thanks for the help everyone, I tried and I tried and I tried again but in the end I took the suckers option and reinstalled the damned thing!

    Thanks all!
    Drugs have taught an entire generation of kids the metric system.

    http://tazforum.**********.com/

  9. #9
    Senior Member roswell1329's Avatar
    Join Date
    Jan 2002
    Posts
    670
    Katja: It's an old adage in information security (especially when dealing with a Unix system) that if someone has access to the console, the system is already compromised. Because of that, security on the console is usually pretty lax (although not always...you can make it fairly tight through the use of BIOS passwords, lockable cases, etc.). Physical security mechanisms should be employed long before someone can reach the console (with things like ID badge access, security cameras, guards, biometric controls, infared sensors, sharks with frickin' laser beams attached to their heads, etc.). If someone can reset the physical machine, then they could simply boot off a 3rd party disk, mount the local root filesystem and change the root password. Therefore, physical security around a system console should be given equal if not more attention than the software security on the system itself if the system carries any information worth protecting.
    /* You are not expected to understand this. */

  10. #10
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Location
    Washington D.C. area
    Posts
    2,884
    Interesting that this failed in SuSE. I had worked on the RedHat distros for years. I think I'm going to give it a run on a lab machine on Monday morning just for fun.

    Katja,

    This isn't a security issue. Take a peek at single user mode in linux and it should be fairly obvious why this is the case. Well, other than what roswell has already provided, which I agree with 100%.

    Also, this technique is all over the internet. Throw linux root password reset in google. My guess it that you'll have 100s of hits on the 2 techniques listed here.
    Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
    Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •