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

Re: dead lock



On Thu, Oct 14, 2021 at 02:54:26PM +0200, Pierre Frenkiel wrote:
> 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?

During the installation, you are asked for a root password, and you
are given the option to leave it blank.  If you supply a root password,
then you can use that to login directly as root on a console.  (Press
Ctrl-Alt-F2 to get to a console.  Press Ctrl-Alt-F1 or -F7 to get back
to your X or Wayland session, if you installed a display manager.)

If you left it blank, then sudo should have been installed, and your
initial user account should have added to the sudo group.  (You can see
your current group memberships by running "id" in a shell.)

If for some reason you've forgotten the root password that you used
during installation, or you've lost your membership in the sudo group,
then you can add "init=/bin/bash" to the kernel parameters in GRUB,
re-mount the root file system read/write, run the "passwd root" command
to set a new root password, and then reboot again.

(Some people do a bind-mount thing in there as well, but I'm not sure
what purpose that serves if you're only going to run passwd.)

But I find it strange that you claim to have this problem "After a Debian
install" which implies that it's a thing you did quite recently.  I
suspect we're not getting the whole picture here....


Reply to: