Re: [SLE] Root passwd gone

From: Chaitanya Krishna A (icymist82_at_yahoo.com)
Date: 07/31/05

  • Next message: Randall R Schulz: "Re: [SLE] KDE 3.4.2 on SuSE 9.3"
    Date: Sat, 30 Jul 2005 15:23:18 -0700 (PDT)
    To: Suse Mailing List <suse-linux-e@suse.com>
    
    

    Hi,

    > >>Just in case you get any other rash urges to exercise commands like that in
    > Just remind yourself in future specifically to NEVER EVER exit a root shell
    > after some desastrous action. Believe me, sooner or later you WILL have
    > opportunity to use that advice. Use another terminal or ssh to verify that
    > you
    > have indeed rectified your mistake and can login as root.
    Sure. Ya, I have learnt my lesson. Thanks for the advice. I WILL not exit the
    root shell unitl I am sure that everything is Ok.

    > >>In that case you should be able to use the rescue cd to boot up, chroot to
    > >>your original system and then use passwd to give root a password.
    > >
    > > I did use the rescue CD. I don't understand this chroot thing. Can you
    > > elaborate on that a bit.
    >
    > When you boot the rescue CD the root volume "/" used is from the cd. So any
    > action you try to execute on /etc or /sbin will be executed on the cd files.
    > The
    > command chroot mounts another volume as the root volume. In this case you
    > need
    > to know which device on your hdd is the root volume, something like /dev/hda2
    > or
    > /dev/sda3.
    > So, you boot the rescue CD and thus you are root. Then you execute "chroot
    > /dev/sd2" (or whatever YOUR root device is). Afterwards you have a running
    > root
    > shell and your normal filesystem is mounted. Then you should be able to run
    > any
    > root command you need.
    Ya, I did chroot to my filesystem on the hard disk. I booted in the Rescue
    mode. Then mounted my root partition /dev/sda1 to /new and chroot'd into /new
    and then gave passwd and gave a new passwd. It said passwd changed, but still
    no improvement. When I as user give su, it still gives the same error, i.e.,
    $ su
    su: cannot set groups: Operation not permitted

    > > Ya I did make a backup. But then I think the harm has already been done to
    > the
    > > files before I made a backup.
    >
    > If you have only changed the file permissions then the damage is not really
    > significant. Many years ago I remember that I accidentally gzipped all the
    > files
    > in the /etc directory and I also panicked. Fortunately it was a test system
    > with
    > nothing installed yet.
    As I told in the first mail, I meddled with the passwd and shadow files before
    I made a backup. I deleted the x in root entry in /etc/passwd and made the root
    line look as root:::: in /etc/shadow. This I did from the rescue disk.

    Anything else that can be done?

    Regards,
    Chaitanya.

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Randall R Schulz: "Re: [SLE] KDE 3.4.2 on SuSE 9.3"

    Relevant Pages

    • Re: edvtoc and correcting the vtoc on a drive? (solved, sort of..)
      ... to gain access to your hard drive's root filesystem. ... (check the chroot man page for more info on how it works). ... I've thought of trying to reboot like it says in the directions, ...
      (comp.unix.sco.misc)
    • Re: edvtoc and correcting the vtoc on a drive? (solved)
      ... to gain access to your hard drive's root filesystem. ... (check the chroot man page for more info on how it works). ... I've thought of trying to reboot like it says in the directions, ...
      (comp.unix.sco.misc)
    • Re: AppArmor FAQ
      ... but it is a model that works in the limited http environment ... AppArmor was designed to do, and without specifics, this is just ... Exploited httpd is root shell. ...
      (Linux-Kernel)
    • Re: Single User Mode and Root
      ... M> Ian Northeast wrote: ... M>>>> so that single user mode doesn't have root privledges. ... M> need root shell and they're known. ... You cant protect a machine from people with physical access. ...
      (comp.os.linux.misc)
    • Re: bash as login shell
      ... but no explicit choice for bash occurs in the drop down list ... |>>> Account Manager. ... |>>For the root user, yes. ... |> and found the root shell had been changed to csh. ...
      (comp.unix.sco.misc)