Re: RESet the SUSE LINUX PASSWD



On Mon, 14 Jan 2008, wrote:-

Dear all,
I am new to LINUX .please help.
I am not able to reset the root passwd of the SUSE . Whnever I press e
at the time of GRUB load, I get 2 options 1) Linux 2) Failsafe

Now what to do next. The CPU is also showing:- in the maintainenc
mode only Ctrl D would work shutdown or reboot would not work.

That looks like the system wasn't shut down correctly and a fsck of the
root file system made some changes. Now, if you know the root password,
you can log in and perform the fsck. If you have forgotten it, you have
two things to do. The first is to get the fsck done so the system will
boot. The second is to reset the password.

To get the fsck done, boot the system using the installation CD/DVD and
start the rescue system. Once that's booted, you'll get the login prompt
at which you should enter root. There is no password for root on the
rescue system so you will come straight to the command line. Here you
need to find out just what partitions you have by using the command:

fdisk -l

This will give you a list of the partitions on all the drives attached
to your system. For instance, on one of my systems I have the following:

donnas:~ # fdisk -l

Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 5 40131 83 Linux
/dev/hda2 6 528 4200997+ 82 Linux swap / Solaris
/dev/hda3 529 1312 6297480 83 Linux
/dev/hda4 1313 9726 67585455 f W95 Ext'd (LBA)
/dev/hda5 1313 3401 16779861 83 Linux
/dev/hda6 3402 4446 8393931 83 Linux
/dev/hda7 4447 5491 8393931 83 Linux
/dev/hda8 5492 6014 4200966 83 Linux
/dev/hda9 6015 7300 10329763+ 83 Linux
/dev/hda10 7301 7451 1212876 83 Linux
/dev/hda11 7452 7600 1196811 83 Linux
/dev/hda12 7601 7700 803218+ 83 Linux
/dev/hda13 7701 8601 7237251 83 Linux
/dev/hda14 8602 9726 9036531 83 Linux

What you're looking for are partitions that have an ID of 83. Then you
need to perform an fsck on each of those file systems. To do that, using
the system above as an example, I would use something like this:

fsck -s -y -f /dev/hda{1,3,5,6,7,8,9,10,11,12,13,14}

Bash expands the contents of the {} so the command line passed to fsck
is actually:

fsck -s -y -f /dev/hda1 /dev/hda3 /dev/hda5 /dev/hda6 /dev/hda7 /dev/hda8 /dev/hda9 /dev/hda10 /dev/hda11 /dev/hda12 /dev/hdav13 /dev/hda14

This will check each file system in sequence (-s), automatically repair
any file system corruption (-y), and will force the check (-f) even on
cleanly umounted file systems if the particular checker supports it.

Once that's complete, shut down the system and reboot. The system should
then boot normally and you should be able to log in as your normal user.

If you still need to reset the root password, you can do that while
still inside the rescue system. To do so, you need to know which of the
partitions is / and mount it on /mnt. Using the above system, / is on
/dev/hda3 so I would mount it using:

mount /dev/hda3 /mnt

The next thing to do is to create a /dev/urandom on / , or copy the one
from the rescue system onto / . I use the following:

cp -a /dev/urandom /mnt/dev/urandom

Next is to enter a chroot jail on / by using:

chroot /mnt /bin/bash

At this point, I can now use passwd to change the root password:

passwd root

In my experiments, it asks for the new password, and a confirmation of
the new password before setting it. Unlike when a normal user resets or
changes their password, passwd doesn't ask for the old password. Once
the password is changed, press CTRL-D or type exit to exit the chroot
jail. You can then reboot the system and root will be able to log in
using the new password.


Regards,
David Bolt

--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a0
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
.



Relevant Pages

  • ieee1394: host adapter disappears on 1394 bus reset
    ... bus reset, one of the controllers is lost. ... received (phyid 8, not root) ...
    (Linux-Kernel)
  • after applying JASS/SST profile, root passwd expired
    ... But even in single user mode, trying to reset the passwd or 'passwd -x ... -1 root' fails with Permission denied. ...
    (comp.unix.solaris)
  • Re: problem with the pagefile.sys
    ... Pagefile.sys is hid OS file in the root of c: ... Have you tried to turn virtual memory off and then back on to reset it...? ...
    (microsoft.public.windowsxp.basics)
  • Re: Password
    ... One way to reset root password: ... user command line where you can simply enter: ... then just reset the password by typing "passwd" ... This is for root. ...
    (alt.os.linux)
  • Re: Reset root password
    ... >figure out how to reset it. ... I can login locally as a regular user. ... >Is there a way that i can reset the root password from the system ... However, IF you have physical access to the machine, you could boot up in ...
    (comp.os.linux.security)