Re: [SLE] Root passwd gone

From: Jerry Feldman (gaf_at_blu.org)
Date: 07/31/05

  • Next message: R Goodwin: "Re: [SLE] DVD Hardware Question"
    Date: Sun, 31 Jul 2005 09:07:44 -0400
    To: suse-linux-e@suse.com
    
    
    

    On Sat, 30 Jul 2005 14:14:50 -0700 (PDT)
    Chaitanya Krishna A <icymist82@yahoo.com> wrote:

    > I did use the rescue CD. I don't understand this chroot thing. Can you
    > elaborate on that a bit.
    chroot(1) allows you to run a shell with a different root file system.
    When you boot the rescue system, your root file system is in a ramdisk.
    But if you need to reset your root password, what you do is:
    1. Mount the root file system from your normal boot HD:
            mount /dev/hda1 /mnt
    2. make that the new root file system:
            chroot /mnt
    You will now be in a shell where it thinks that /mnt is the root file
    system instead of the ramdisk /
    3. Run the appropriate commands such as passwd(1).
    4. Exit chroot like you would exit any other shell.

    If I remember in your case, you messed up either permissions or
    ownership. You do not necessarily need to use chroot for that. All the
    executable files in bin, /usr/bin, /sbin should be owned by root.
    But there are some exceptions for group. (from /sbin)
    -rwxr-sr-x 1 root shadow 6808 2005-03-21 10:53 unix2_chkpwd
    -rwxr-sr-x 1 root shadow 37483 2005-03-19 14:22 unix_chkpwd

    -- 
    Jerry Feldman <gaf@blu.org>
    Boston Linux and Unix user group
    http://www.blu.org PGP key id:C5061EA9
    PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
    
    


    • application/pgp-signature attachment: stored

  • Next message: R Goodwin: "Re: [SLE] DVD Hardware Question"

    Relevant Pages

    • Re: simple boot question
      ... You will probably have to boot into single user ... When booting FreeBSD, select option 4 at the "Welcome to FreeBSD!" ... You will be prompted as to the location of your root file system. ... Remount the root file system read-write with the command: ...
      (comp.unix.bsd.freebsd.misc)
    • Re: [SLE] Help with install to 5th partition - Continued
      ... there is no need to boot a rescue since shutting down ... > But, when running the standalone, the root file system is the root file ... > root file system and chroot to it, then run YaST from there. ...
      (SuSE)
    • Re: Improper shutdown of system / Fragmentation Problems / Boot logs
      ... Sometimes the power goes out and my machine shuts off. ... backup it fails at check root file system. ... Improper shutdown of system / Fragmentation Problems / Boot logs ...
      (freebsd-questions)
    • Diskless boot troubles
      ... So I want to perform a diskless boot. ... I had to make some modifications to /usr/share/examples/clone_root to create the diskless root file system. ... complaining about the differences in treatment of the -1 option between bsd tar and gnu tar. ...
      (freebsd-questions)
    • [Summary] Unable to boot Ultra 60
      ... I was unable to get my system to boot ... I just can't buy that with all partitions ... > is after the root file system is mounted. ... >> Michael DeSimone ...
      (SunManagers)