On 04/16/2012 02:29 AM, Larry wrote:
On 04/16/2012 01:28 AM, vivek chalotra wrote:
Dear all,
I have forgotten the root password of my main server having SLC 5.7.
Kindly let me know the easiest way to change or retrieve it.
boot to single user mode and reset it :)
Unless you've changed /etc/inittab to prevent just dropping you into a root
shell without a password (we have such requirements), such as adding:
~:S:wait:/sbin/sulogin
In this case, boot the cd/dvd/pxe installer with the kernel argument "rescue" which won't start the
install, but rather will offer to mount the disks (which you need) and drop you into a root shell, which you
can then "chroot /mnt/sysimage" and then run passwd, "exit" the chroot shell, then exit
again to reboot.
FYI, in SL6.x, the change is to /etc/default/init:
SINGLE=/sbin/sulogin
Regards,
Chris