SCIENTIFIC-LINUX-USERS Archives

June 2020

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:
Konstantin Olchanski <[log in to unmask]>
Reply To:
Konstantin Olchanski <[log in to unmask]>
Date:
Tue, 23 Jun 2020 07:35:12 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
On Tue, Jun 23, 2020 at 10:49:48AM +0200, Elio Fabri wrote:
> Hi all,
> I need help (at lest a link) as to how to recover my root password.
> I'm using SL6.2. The password I remember by heart is no longer
> accepted, neither for the su command nor for sudo.
> Thx

While you cannot "recover" the root password, if you have physical access
to the machine, you can bypass it, login as root and reset the password:
remove the boot disk from problem machine, attach it to a 2nd computer,
mount the root partition, go to root/.ssh and install your ssh key. unmount,
reassemble problem computer, boot, ssh into root, done. While the boot disk
is mounted on the 2nd computer, in addition to installing the ssh key,
you can also reset the password (edit /etc/shadow) or setup "sudo" for
password-less "sudo root" (recent Ubuntu are setup this way, you never actually
use the root password to login into root).

-- 
Konstantin Olchanski
Data Acquisition Systems: The Bytes Must Flow!
Email: olchansk-at-triumf-dot-ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada

ATOM RSS1 RSS2