superuser

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

superuser

#1 Post by Lonewolf71 »

Hello guys.
Someone has brought it to my attention that opening an app like a text editor or music player etc. shouldn't show "superuser" at the top, so how can I remedy this? If it's not supposed to be showing that.
FYI...Anytime I install Linux from day 1, I ignore the part where it tells you to create a root password, so is that good or bad? I thought it was dangerous to do that???

arochester
Global Moderator
Global Moderator
Posts: 2007
Joined: 2010-12-07 19:55
Has thanked: 1 time
Been thanked: 1 time

Re: superuser

#2 Post by arochester »

opening an app like a text editor or music player etc. shouldn't show "superuser" at the top, so how can I remedy this?
Have you got a picture that shows this?

If it was "dangerous" to create a Root password why would the Debian installer allow you to do that?

Bulkley
Posts: 6143
Joined: 2006-02-11 18:35

Re: superuser

#3 Post by Bulkley »

You will need a root password or sudo or both in order to install software and do upgrades. You can create a root password with

Code: Select all

# sudo passwd root
You are right that one should not run a user as root. Doing so is a big risk. When in root it is very easy to make fatal mistakes.

I spent too much time in the sun today. Edited to insert "not"
Last edited by Bulkley on 2021-07-18 18:41, edited 3 times in total.

User avatar
Hallvor
Posts: 1175
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 3 times
Been thanked: 2 times

Re: superuser

#4 Post by Hallvor »

I blame Ubuntu for treating sudo passwd root as some sort of malicious command, when in reality it's far from the truth.

This is quite easy.

1. Do not run your system as root. Separation from the root account prevents you from doing dumb things like deleting important files or folders by accident, or destroy your system because of a little typo. Also, any attacker would get full root access instead of user access.
2. Enable the root account if you want - or just use sudo. Both options are safe for administering your system, assuming that you use strong passwords.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

CwF
Posts: 1094
Joined: 2018-06-20 15:16
Been thanked: 2 times

Re: superuser

#5 Post by CwF »

We are getting close to having a rootless AND sudoless system with xfce. If the installer knew which DE at root creation time (it doesn't) and had an "administrator user" option (maybe a windowism), then the pkla rule file could be created in the users name for full function.

An issue would be the many programs with policy files would need to find a way to respect this 'administrator' and add their info to the pkla rule file...

If so we'd have yet another wheel, that also rolls, kinda like the old ones did...

Personally, I like having a root account available on a tty with full startx DE function for when I enter no BS mode. With a complete polkit on xfce I never (rarely) need root or sudo. Unfortunately the DE matters and root authority is no longer a universal answer.

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#6 Post by Lonewolf71 »

Would someone please explain to me if I'm not supposed to be a superuser, why does both Mint and Debian and probably other distros install as a superuser???

Debian
Image

Mint
Image

CwF
Posts: 1094
Joined: 2018-06-20 15:16
Been thanked: 2 times

Re: superuser

#7 Post by CwF »

...because as you said, no root, therefor sudo.
Try an install where you give root a password?
Otherwise, does it matter? That's not the desktop.

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#8 Post by Lonewolf71 »

So as it is currently, i'm running as admin or no? To my knowledge, if I have to type my password to become root or use sudo i'm a standard user. yes or no?

CwF
Posts: 1094
Joined: 2018-06-20 15:16
Been thanked: 2 times

Re: superuser

#9 Post by CwF »

Lonewolf71 wrote: 2021-07-18 21:38 have to type my password to become root or use sudo i'm a standard user. yes or no?
Yes.
Get to a desktop.

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#10 Post by Lonewolf71 »

CwF wrote: 2021-07-18 22:07
Lonewolf71 wrote: 2021-07-18 21:38 have to type my password to become root or use sudo i'm a standard user. yes or no?
Yes.
Get to a desktop.
What do you mean exactly? Go to my desktop and do what? I am simply asking for help and understanding.
Last edited by Lonewolf71 on 2021-07-18 22:10, edited 1 time in total.

User avatar
Hallvor
Posts: 1175
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 3 times
Been thanked: 2 times

Re: superuser

#11 Post by Hallvor »

There is no thing as "admin" in the GNU/Linux world. Root, my friend.

If you are in doubt, open a terminal (without typing su or sudo) and type

Code: Select all

whoami
Example 1:

Code: Select all

root@debian-thinkpad:~# whoami
root
I am root.

Example 2:

Code: Select all

hallvor@debian-thinkpad:~$ whoami
hallvor
Regular user.

You type your (su or sudo) password to elevate your system rights to root.

If you don't need to type your password to alter your system, for instance installing new applications from Synaptic, you are already running as root.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#12 Post by Lonewolf71 »

Hallvor wrote: 2021-07-18 22:09 There is no thing as "admin" in the GNU/Linux world. Root, my friend.

If you are in doubt, open a terminal (without typing su or sudo) and type

Code: Select all

whoami
Example 1:

Code: Select all

root@debian-thinkpad:~# whoami
root
I am root.

Example 2:

Code: Select all

hallvor@debian-thinkpad:~$ whoami
hallvor
Regular user.

You type your password to elevate your system rights to root.

If you don't need to type your password to alter your system, for instance installing new applications from Synaptic, you are already running as root.

Code: Select all

family@hp-lin:~$ whoami
family
As I thought i'm a regular user right?

I ALWAYS have to type my password to make any elevated changes or install programs

There is no thing as "admin" in the GNU/Linux world. Root, my friend.
It's just a word and means pretty much the same thing, forgive me I come from Windows until mid December of 2020

User avatar
Hallvor
Posts: 1175
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 3 times
Been thanked: 2 times

Re: superuser

#13 Post by Hallvor »

Yes, everything looks fine.

There is no need to beg for forgiveness, but if someone came to Burger King and asked for McFlurry, someone might have mentioned that as well, even if ice cream is ice cream. :wink:

Welcome.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#14 Post by Lonewolf71 »

Point taken. So I've been watching lots of debian 10 installs on youtube and none of them create a root password, because it's risky as they say and using sudo is a better option. What are your opinions on that?

Would Firejail cause my apps showing superuser?
Last edited by Lonewolf71 on 2021-07-18 23:33, edited 1 time in total.

User avatar
Hallvor
Posts: 1175
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 3 times
Been thanked: 2 times

Re: superuser

#15 Post by Hallvor »

Maybe someone more knowledgeable than me will want to weigh in here, but I always set up my computers with root passwords.

It is just two ways of doing things.

sudo makes you able to issue single commands as root, while using the root account lets you start a privileged session.

What's most secure? It depends.

https://unix.stackexchange.com/question ... u-or-login
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#16 Post by Lonewolf71 »

I think Firejail is the culprit.
2016 issue, but it is still possible...
https://github.com/netblue30/firejail/issues/258

jakoline1
Posts: 40
Joined: 2021-07-06 00:49
Been thanked: 1 time

Re: superuser

#17 Post by jakoline1 »

Lonewolf71 wrote:I've been watching lots of debian 10 installs on youtube and none of them create a root password, because it's risky as they say and using sudo is a better option
That's it right there. Read this found in Debian's wiki:
At installation time, you are asked whether you want to use the root account or not.

If you want to (the default), you'll be asked to provide a complex password for root. Use a strong one!
If not, no root account is enabled and the password of the first user created will be used for administration tasks.
I think your problem is simply that you did not create a root account, you left the field blank or answered no or whatever, hence when you login you're automatically granted root permissions, and every application you launch will have "As superuser" in the window title.

If someone said you shouldn't create a root password/account because it's dangerous then that person is ignorant, the video/article was too old or he's using Ubuntu.

Next time when you're installing Debian do this:

1- Create a root password.

2- And create a password for your regular user as well.

3- After installation is complete, start your newly installed system and open terminal (Ctrl+T).

4- Become superuser by typing su

5- Install sudo with apt-get install sudo

6- Add your user to group sudo by typing /sbin/adduser username sudo (replace username with your username, watch out because it's case-sensitive).

7- Logout then log back in.

8- Type sudo echo 'Hello, world!' in terminal.

Now everytime you need to install an app use sudo apt-get install application-name

I think if you followed these steps your problem will be inshallah solved, as for Calamares being launched as superuser I think that's pretty normal for an installer. Notice that by following this way you're still creating a root account, but you're using sudo to perform root activities without using the real root account.

If after this problem still exists then contact Debian mailing list at https://lists.debian.org/debian-user/ or at https://lists.debian.org/debian-desktop/

As for your personality, I think you need to be more clam and be more grateful towards people who provide you with free technical support. The guy who said "Get to a desktop" gave you a possible line to follow but you totally missed it and become angry, learn to communicate your issues better, and actively participate in finding the solution.

Edit: Let us know when/if you find a solution and test it. For archiving purposes, as it helps other people when they're stuck in the same situation.

Lonewolf71
Posts: 50
Joined: 2021-06-30 21:38
Been thanked: 2 times

Re: superuser

#18 Post by Lonewolf71 »

Firejail is the culprit!
I disabled it and look...

It says [Read-Only] since I'm not root, but no more superuser on the titlebar :D

Image

jakoline1
Posts: 40
Joined: 2021-07-06 00:49
Been thanked: 1 time

Re: superuser

#19 Post by jakoline1 »

You're right, I tested Firejail right now and it's causing me all sorts of trouble when launching various applications.

You can still enjoy Firejail, just don't set it to auto-start and don't type sudo firejail
only use "firejail appname" when you wanna launch a specific app with Firejail.
firejail vlc
firejail firefox-esr
firejail brasero
etc...

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3655
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 4 times

Re: superuser

#20 Post by sunrat »

jakoline1 wrote: 2021-07-19 01:06
At installation time, you are asked whether you want to use the root account or not.

If you want to (the default), you'll be asked to provide a complex password for root. Use a strong one!
If not, no root account is enabled and the password of the first user created will be used for administration tasks.
I think your problem is simply that you did not create a root account, you left the field blank or answered no or whatever, hence when you login you're automatically granted root permissions, and every application you launch will have "As superuser" in the window title.
Absolutely not! If one doesn't create a root password during installation the user is automatically added to sudoers and sudo must be used for elevated privileges.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply