Debian root account

Post Reply
User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Debian root account

Post by trawglodyte »

The main point of this post is to express that I really love defaulting to root w/ the Puppy distros I've tried. I didn't even realize how much time I was spending sudoing, chmodding, and chowning in Ubuntu/Debian based distros. But I want to explain an issue I had w/ Debian to illustrate that.

I was brand-spankin' new to Linux, in hindsight would have been great to spend a year studying it before attempting to install it, but that just doesn't exist in reality for many people.

In the Debian installation, there is a screen to set a password for root, then another screen to name the user account and set that password. I didn't just blaze through it. I actually was looking up everything as I went. I later learned that standard practice is to leave the root password blank, set up the user account and you then log-in as a user with sudo-privileges. Which is what Debian wants you to do.

The issue is that if you give the root a password, not only can you still NOT log in as root, but the user you created is not in the sudo group either. So you wind up in a fresh OS as a user without sudo who can't install or remove apps, command line is useless, you seek help and get lectured by people about how a stupid newb has no business being root, etc... and meanwhile you barely know how to explain what it is you're hoping to do exactly, but you have correctly assessed that this OS is f'n worthless to you unless you can be root or sudo, etc... and that people keep telling you to put "su" in command line, but it doesn't work when you try it.

For me, I eventully figured out just re-install, leave password for root blank, now you have a user with sudo and that's what most Debian/Ubuntu instructional materials and online help is geared towards anyway.

This is embarassing for me to say, but here it is over a year later, I decide to install Debian again. I'm feeling quite confident. I've learned alot about Linux since that initial experience..... I do the same thing again. lol. Yes, I now have better ways of approaching the problem and I'll get it handled. But it's still confusing, it's still clear that, in general, they just don't want people using root access. I really don't know why their standard install .iso even has the screen for that.

I may not be the smartest guy, but I'm not a complete moron either AND I have spent a lot of time reading/learning Linux. I feel as if I was right initially that something is not quite right with this, and it wasn't just that I was a newb who didn't know what I was doing.

I want to offset a bit of what I've said so far, by also saying this. I can only imagine how difficult being a network administrator is, I spend a good amount of time just keeping one computer operating optimally. I can't imagine keeping a network of 100 or 1,000 computers. I also can understand corporation or educational institution that really needs different groups, permissions, and so forth. I know that if Debian made everything just how I'd like it, then it would be horrible for a lot of other people. I think I understand the reasons for it, the general idea of how it all works, I accept all that.

I just find myself in my Puppy distros more and more, and am not happy with user account w/ sudo any more. But Debian also tells me root account is only for administrative duties and should never, ever, under any circumstances being used as a personal account. Especially by a guy like me who goofs off, tinkers, and doesn't mind breaking an OS, wiping it and starting over. I'm probably their biggest nightmare of someone with a root account. But so what? It's my computer, right?

I think I'm going to try a fresh install of Debian 12 w/ root access, there's a good chance I'll figure out they're right and I'm wrong and it is a horrible idea. But I gotta try it to know. I might also just wipe their OS off my machine and never use it again at the end of this. Who knows?

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

williwaw
Posts: 1594
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: Debian root account

Post by williwaw »

you could try a minimal net install and build what you need with apt
you can build a system without sudo and configure users without passwords

the only reason I can think you would need a user is for running some apps that complain if run as root

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Debian root account

Post by trawglodyte »

williwaw wrote: Sun Jan 28, 2024 3:42 am

you could try a minimal net install and build what you need with apt
you can build a system without sudo and configure users without passwords

the only reason I can think you would need a user is for running some apps that complain if run as root

A user without sudo can't install or remove a single package with apt.

I can actually say something nice about Debian installer here. You get choice of desktops (you can even install multiples if you want) a couple choices for networking, and basic utilities. It really is quite minimal, like you COULD even install it without a desktop and basic utilities if you want. That part of it is really good.

But yah, I hear you on apps complaining when run as root. I ran into that a bit with Brave browser (which I use as a pseudo email client. I found the --no-sandbox hack but it "complains" like you said. Running it as spot I think is gonna be the ticket for me, especially for my purposes of an ultra-secure email client that I don't need to upload and download a lot of files like my main browser. I think it actually adds a layer of security, whereas the --no-sandbox probably reduces some of the features of Brave that I like to begin with.

Last edited by trawglodyte on Tue Jan 30, 2024 12:25 am, edited 1 time in total.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
bigpup
Moderator
Posts: 6268
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: Debian root account

Post by bigpup »

We are Puppy Linux!

Resistance is futile!

You will come out of the darkness into the light!

You control the vertical, the horizontal, input, output, you always have control!

You are the master of all in Puppy Linux!

You are about to enter another dimension. A dimension not only of sight and sound, but of mind. A journey into a wondrous land of imagination!

There is a fifth dimension beyond that which is known to man. It is a dimension as vast as space and as timeless as infinity. It is the middle ground between light and shadow, between science and superstition, and it lies between the pit of man's fears and the summit of his knowledge. This is the dimension of imagination.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

backi
Posts: 589
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 71 times
Been thanked: 65 times

Re: Debian root account

Post by backi »

@trawglodyte :
For me as a simple/naive End-user .......You nailed it perfectly !

This is why i love Puppy (or the "Dogs") so much for letting me ,as a single User,running the OS without this annoying Root Shit.
Sure there maybe good Reasons for not running as Root.......others will say.....for security Reasons.

Running in Ram ,just saving to Drive or Stick on Demand. In case something did not work as expected ....can anytime use a backed-up Save File /Folder again.............
Running in Root......never encountered any Problem (as far as i am aware of) in 10 Years or more now....

I am rather satisfied with running in Root.......never encountered any Problem.
Puppy Linux and the "Dogs" are hard to beat.....if at all...!

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Debian root account

Post by trawglodyte »

FWIW - Here's the big secret Debian doesn't want you to know. Your best bet if you want to be able to login as root is have a user with sudo. You can accomplish this at install by leaving the root password blank, then specifying username and password for user. Then you have to do 3 things.

  • edit /etc/pam.d/gdm-password by commenting out line 3 <# auth required pam_succeed_if.so user != root quiet_success>

  • edit /etc/gdm3/daemon.conf by adding a line under [security] which says <AllowRoot=true>

  • In terminal <sudo passwd root> You will first enter your user password, then assign a passord for root. (I'm not entirely sure if it's necessary, but I entered a password for root that was at least 6 characters based on some other documentation I had read.)

And, yes, then at the login screen you use "root" for the login name and the password you gave root. Or you use your username and the password you gave the user, whichever account you want to login as.

That said, being root in Debian will still never be as fun as being root in Puppy Linux, lol. Believe me, they'll make sure of that. But yah, it's just those three things, but you would not believe how much misleading info, non-info, and crap you have to sift through to find it. I still contend that Debian's installation program gives you the false impression you can do it and you can't. I even did expert install options and made a root account with no user. All that did was bring me to a screen where I had to create a user on first boot. I still couldn't login as root.

Also, if you do this and have any trouble or problems..... Don't ask for help on the internet. lol. They will yell and scream at you and probably form a lynch mob to come get me for telling you how to do it. You're on your own and there is risk associated with root user on Debian.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

williwaw
Posts: 1594
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: Debian root account

Post by williwaw »

Don't ask for help on the internet. lol.

:lol:
passwd -d root

https://unix.stackexchange.com/question ... -on-debian

Post Reply

Return to “Other Distros”