No root rights linux?

Ex
5

Hi @ all I have just installed Linux / debian 10.0 on another laptop of mine. I have only been a Linux user for 3 months and have looked at various Linux versions. Now I'm facing a completely different problem. Why don't I have root rights? I want to install something and receive the following text is not in the sudoers file / this incident is reported.

pl

Change the sudoers configuration so that the corresponding user can execute a sudo (not a great option).

Set a root password and log in as root (depending on the scenario, not so happy, you actually don't want to operate a graphical user interface with full root rights).

Set a root password, turn the unprivileged user into a wheeler (this is necessary for Debian afaik, but would also be changeable), who can then use su + password from root to assume their rights / identity.

-----

It is generally unwise to assign root privileges without a second factor (password).

Pi

Then something went wrong when installing.

Unless you have set your own password for root, you have to reset it once or alternatively enter yourself in the sudoers.

This can be done using the Rescue Console; Instructions are available on the Internet.

mo

Is not in the sudoers file / this incident is reported.

root does not need sudo rights, it is itself the superuser.

You probably tried to run a command with sudo as a "simple" user.

sudo (one could read the -english- like SUperuser DO) must be configured for individual users to whom superuser rights (root rights) are to be assigned.

Some distributions prepare this during installation (to make it easy for children). Others like openSuSE don't do that.
I can't say how Debian does that.

Can you join

su

Sign in?

The root password that you specified during installation is required.
Forgot Password?
That too can be solved.

either you have an account that has sudo rights, then log in with this name and set a new password with sudo passwd root.
or change the root password with a Linux live system. I have already described this several times here, but would only repeat it if you wanted to follow this path.

With some distributions, only the user that was created during installation is entered in the / etc / sudoers file. This file can also only be edited with root rights.

mo

Unless you have set your own password for root, you have to reset it once or alternatively enter yourself in the sudoers.

how do you do that if root has no password and "normal" users are not configured in sudoers?

Pi

Set init to bash in GRUB, root FS writable mount, change password, reboot.

That is also well written on various forums, blog posts, etc.

The alternative is to use a live CD instead of bending GRUB; it takes a bit of chroot magic, but the basic principle is the same.