forgotten root psswrd
Results 1 to 7 of 7

Thread: forgotten root psswrd

  1. #1

    Unhappy forgotten root psswrd

    Well in my atempt to make a good psswrd well i've forgotten it.
    So i was just wondering if there's anyway to reset the root psswrd while using a normal user account?
    Operating system is SuSE9.1 personal.

    i thought about using knoppix but i don't think that would work from the info i've been able to gather from google.

    And i really couldn't be bothered formatting re-installing as i'm sure that there is a way to by-pass this problem.

    front2back

  2. #2
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    A couple of ways are the more common way of resetting Linux passwords:

    1. Boot with a live cd, mount the / partition as r+w under a different mount point, go into /etc/shadow and remove the password. Save the file, exit and reboot. Should work.

    2. Some systems still allow for single user boot (init 1). You can, at the time of boot, pass arguments to the boot. One is init=/bin/bash (for lilo --- never done it with grub). Depending on the distro, you might end up at a root prompt, no password.

    Obviously these require physical access.


    There is a third way: find an exploit that drops you into GID/UID 0.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  3. #3
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    To add to this:

    Be careful removing the password if you haven't already done this. SUSE by default tries to stop people from getting root because they can touch the keyboard. So going into Single User mode, you need root passwords, and doing the other, well I once had to reformat after doing it lol. Anyway it may work for you, just watch yourself. And do a back up.

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Posts
    131
    If grub allows you to type your choice simply type "linux single" this will drop you into init(1)
    Then its as easy as typing passwd root.

    On most distros you can also boot off the first cd used for installtion, and type something like
    boot: bare.i root=/dev/hda1 noinitrd ro

    At least in slack you can. and I know Red-Hat has an option similiar.

    Otherwise go with the knoppix route, Or perhaps sysresccd.org tools.
    Whats a \"START\" button?

  5. #5
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    He said he doesn't have the Root Password, and I pointed out you need it with SUSE.

  6. #6
    Well i did resolve this problem with the advice that msmittens supplied..
    I was sure that someone else at the shop had worked out the root psswrd to the particular box.
    {It stores account customer's credit cards, orders, etc etc }
    So in a haste i changed psswrd's, with a lot of customers and lot's of work to do i forgot the new psswrd.

    So i DID get the root psswrd changed with out any major problems and no data lost.

    But thanks for the extra input into this discussion as i'm sure these ideas will also help others whom run into a similar problem.

    front2back

  7. #7
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Location
    Washington D.C. area
    Posts
    2,884
    My experience with this (now that everyone has the solution in hand) is that many distros are wise to the init 1 method of resetting a root password. That said, using a boot CD has worked in most cases for me.

    More specifically:
    1. Boot with a live cd, mount the / partition as r+w under a different mount point, go into /etc/shadow and remove the password. Save the file, exit and reboot. Should work.
    Ms Mitts beat me to it.
    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
  •