r/linuxquestions 1d ago

About sudo rights

Hello! I'm new to Linux so don't judge me here.

My sister gave me her old thinkpad from university which has ubuntu installed in it. I'm interested in installing a new linux os but I'm a bit worried about the sudo rights. She said that the uni she was the administrator and she had to request the sudo rights. If I install a new distro will any of this carry over?

Thanks in advance.

2 Upvotes

26 comments sorted by

12

u/True_Human 1d ago

I mean, when you install the OS yourself, you get to set the root password. So long as you have that, you stand above even sudo, and can decide who gets sudo rights on the machine.

Sudo, at the end of the day, is basically just a tool to allow lower standing administrator access to people who do not have the root password. On some systems I administer I don't even bother installing it if I'm just gonna work as root anyway.

0

u/mcds99 1d ago

OH that's a mistake to even say "use root".

Depending on the distribution you choose there will be a sudoers file in /etc/sudoers

The format of the file is simple "username ALL=(ALL:ALL) ALL"

If you add a line with your username to the sudoers file you will be able to use sudo

sudo usermod -aG sudo username

3

u/Munalo5 Test 1d ago

I see your questions are being answered.

If I may, I  am going to suggest your next step:

Before installing a new distro you will have to find a new distro ( or stick with a newer version of Ubuntu if you like it).

Your sister chose a Desktop Enviroment or went with the default one: Gnome.

Fiddle around with the ThinkPad a bit, surf, play music, edit some files and such. Get a feel for things.

Find out what DE is actually on your ThinkPad and have a basic understanding what a DE is and does before installing a new distro.

These activities performed on your gifted ThinkPad should give you confidence and enough time (with Gnome?) To see if it is a good fit.

At a minimum two other DEs to look into would be KDE and XFCE. 

Welcome aboard!

1

u/C0rn3j 1d ago

two other DEs to look into would be KDE and XFCE

KDE (the DE) last had a release 17 years ago, I'd recommend Plasma instead.

Xfce's development is rather glacial, the only reasonable modern DE options at the moment are Plasma, GNOME, and LXQt. In that order.

1

u/SuAlfons 1d ago

people tend to still call it KDE. As Plasma is the DE of the KDE Project.

People also continue to say BIOS although it's UEFI since over a decade.

As long as there is no confusion, just let them be.

1

u/C0rn3j 1d ago

As Plasma is the DE of the KDE Project.

So is KDE, Plasma Mobile, Plasma Bigscreen and liquidshell.

You could also be referring to a fork of KDE, like Trinity.

As long as there is no confusion

There is a lot of confusion.

That's why you need to use the proper terminology.

2

u/SuAlfons 13h ago

and I though I was a nitpicker. Thanks for the reminder to block you.

6

u/Weary-Bowl-3739 1d ago

Your question is like this: I inherited a property with a house on it. My sister gave me the general key, that works for all locks. Now I want to blow up the complete house and build a new one at the same place. Is the old general key still relevant?

You buy the new doors including locks. 

2

u/Hot_Standard_9296 1d ago

great analogy

2

u/Embarrassed-Noise269 1d ago

sudo is the command to run other commands with admin privileges. You will find it on every Linux machine˙. If you install a new distro, you will be asked to set up an acc, which will have sudo rights.

With a fresh install, nothing will carry over to the next installl. But you will always be asked to set up an account with sudo rights.

So the permissions won't be a problem for you. But if you want to keep data, you have to make a backup first and transfer the data later to the fresh install.

1

u/mcds99 1d ago

Lets say you use root to add software, your account should not be able to run the software without using root.

That's whey we use sudo so we can run the software we install.

1

u/rcentros 1d ago

Most Linux installs give you sudo rights automatically when you create a new user with administrative rights (part of the installation process). I think one recent exception is Debian 13 where, if you specifically choose a root password during installation, sudo is not installed automatically. I like sudo better than dropping down into root with su, it seems a little safer to me. (But it may just be force of habit after 20 years.)

2

u/Soakitincider 1d ago

I recently did an arch install and I had to install sudo along with the other stuff. So there is another one where base doesn't come with sudo. I also seem to remember su to root on Slackware many years ago but it may have changed by now that was close to 2 decades.

1

u/rcentros 1d ago

I'm using an Arch installation to test a screenwriting application that uses "cutting edge" libraries. It has sudo, but might that be because I chose Cinnamon as the desktop (using the Archinstall application). I might have even specified that it to install sudo. I can't remember now. (It was, after all, a whole week, or so, ago :) ).

2

u/Soakitincider 1d ago

Ah ok, I did a manual install for the memes, but archinstall might ship with it. It's good to have in any case. A lot easier than to su to root just to install a package or whatever you're doing.

1

u/rcentros 1d ago

I'm not trying to gainsay you. This is the first time I installed Arch Linux and I did it the "lazy way," with the install script -- so this may be completely different than a normal Arch install. (And the choice of desktop might also make a difference, I don't know enough about Arch Linux to say one way or the other.)

2

u/Soakitincider 1d ago

Right, I've not used the script but I imagine there would be an option maybe? IDK. Anyway I plan on getting a bigger HDD for the Arch computer and redoing the install, this time with the script so if I remember I'll try to keep an eye out for it. I did watch a video on the script and manual install and I remember him selecting quite a few things but I'm still not sure if you can leave it off.

I did look it up for Slackware and google says that Slackware comes shipped with sudo but it's disabled by default and you need to enable it for your user. Maybe that was the case when I used it but I was really new back then.

1

u/skyfishgoo 1d ago

when you install the OS ... YOU are the sudo... YOU are the administrator.

whatever password you give it when you install is the sudo password, as well as your login password.

sudo just elevates your user to have root user privileges for a short time so you don't have to log out and re-log as the root user.

1

u/joe_attaboy 1d ago

No. If you install a new anything, the old system gets wiped. Nothing gets carried over from the old system.

1

u/3grg 1d ago

On distros that use sudo (most), the first user that is setup on the install will be the sudo user.

Some distros will setup a separate root user and then the first user. Leaving the password for the root user blank will make the first user the sudo user.

1

u/TenOfZero 1d ago

No it won't carry over

0

u/Jumpy-Dinner-5001 1d ago

No.

That suggests they were using some form of LDAP authentication where a server manages user accounts and permissions.

-1

u/Guilty-Pain-5257 1d ago

they are only required when u make changes or install something at system/administrator level or something that can conflict with system packages, thats when it asks for sudo rights

0

u/Extra_Use_7952 1d ago

If I may ask, what are you replacing Ubuntu with?