[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dead lock



2021-10-14 17:54 GMT+05:00, Pierre Frenkiel <pierre.frenkiel@gmail.com>:
> hi
> After  a Debian install on my amd64 laptop, I'm faced to what looks like
> a beautiful dead lock:
> I wanted to set a root account, but that was refused because I'm not
> in /etc/sudoers, and to put me in this file, I need root privilege!
> I suppose that there is a solution, but I couldn't find it.
> Any idea?

My standard actions in such situations (unknown root password + no sudo rights):
A) boot from livecd, mount root partition into /mnt, chroot /mnt,
passwd, umount /mnt, reboot from hdd.
or
B) at boot add line to kernel parameters:
init=/bin/sh

after boot at prompt:

mount / -o remount,rw
passwd   # change root password
sync; sync
mount / -o remount,ro

and reboot (may be via reset button or power switch)

-- 
Stanislav


Reply to: