SCIENTIFIC-LINUX-USERS Archives

April 2012

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Schanzle <[log in to unmask]>
Reply To:
Chris Schanzle <[log in to unmask]>
Date:
Mon, 16 Apr 2012 09:45:02 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
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

ATOM RSS1 RSS2