Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

It is annoying to be honest to no purpose. -- Publius Ovidius Naso (Ovid)


rocksolid / Linux / Reset root passwd on Debian

SubjectAuthor
o Reset root passwd on DebianRetro Guy

1
Subject: Reset root passwd on Debian
From: Retro Guy
Newsgroups: rocksolid.shared.linux
Organization: RetroBBS
Date: Tue, 4 Dec 2018 01:15 UTC
From: retro....@retrobbs.rocksolidbbs.com (Retro Guy)
To: rocksolid.shared.linux
Subject: Reset root passwd on Debian
Message-ID: <65e3dc64b78990ade054d9d99a0f5fa7$1@retrobbs.rocksolidbbs.com>
Date: Tue, 4 Dec 2018 01:15:57 +0000
X-Comment-To: rocksolid.shared.linux
Path: rocksolid2!retrobbs.rocksolidbbs.com!not-for-mail
Organization: RetroBBS
Newsgroups: rocksolid.shared.linux
X-FTN-PID: Synchronet 3.17a-Linux Feb 20 2018 GCC 6.3.0
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
View all headers
I finally got around to dealing with the root password I'd forgotten on a machine I have sitting around.

Here's the info that helped me reset the root password:

EDIT GRUB BEFORE DEBIAN BOOT
During you machine boot process, you should be presented with GNU GRUB screen with countdown, before the default boot option is activated.

Press any key during the countdown period stop the boot process, and then press e key to edit the commands before booting.

One you have entered into editing mode, find the line starting with linux, followed by /boot/vmlinuz-*, and containing section with root=UUID=.

Line should be towards the end, usually two lines before the final line.

On the end of that line, in most case after ro quiet, add one of the following two: init=/bin/bash or init=/bin/sh, as shown on picture below.

Edit kernel line
Edit kernel line
After you have added the init value, press Ctrl+x or F10 key to boot the with the selected options.

Debian should now boot to single user mode, with the root filesystem mounted in read-only mode.

You need to remount it to read-write mode with the following command:
mount -n -o remount,rw /.

After that you can use passwd command to change the root password to a new value.

Change root password with passwd
Change root password with passwd
Type passwd to be asked for a new password, and then reenter the new password again, once asked to retype it, and you should then be presented with following message:

passwd: password updated successfully

You can now reboot your machine, and use the new root password on your system.

--
Posted on RetroBBS


1
rocksolid light 0.7.2
clearneti2ptor