Logging in to the desktop as root

Post Reply
Kgordon
Posts: 8
Joined: Sun Dec 15, 2019 6:27 pm
Been thanked: 1 time

Logging in to the desktop as root

Post by Kgordon »

Excuse me, but how in the heck do you do this? At the login prompt, I click on "other" then use root as my user name, and give it the correct password for root on my system, but it returns "incorrect password".

So how does one fix this?

Ken Gordon

User avatar
tigersharke
Posts: 5
Joined: Mon Nov 11, 2019 6:41 pm
Has thanked: 1 time

Re: Logging in to the desktop as root

Post by tigersharke »

I suspect that as is quite common, X windows (desktop in whatever window manager) is denied access by root directly. I do not know why people insist that they be able to run X as root, I believe there is a way to enable such discouraged access, HOWEVER, I would recommend avoiding it. Instead, assuming your user or a user you create, is in wheel group, you login with this user, then in any xterm (or terminal, konsole, etc) you then type su, granting you root in that xterm. I do this all the time, it works fine for me, and everything else I need to do is run by my user. I nearly always have one xterm open with myself su'ed to root in it. By doing this, I can run nearly anything as root if I wanted to do so but some programs may still not directly allow (may need config adjustments) or may first warn that it is a bad idea.

The main reason it is bad to be root when doing all sorts of things, is that for the most part root is not denied, it can always do whatever is attempted, and this means/includes very bad things. When you begin a process (run a program) as root, all further actions of that program likely have root permissions as well.

The difference between FreeBSD or Linux, and just about everything NOTMicrosoft Windows, is that you do not need to be admin/root to accomplish many things, however you can access the privs of root as I described above. A per process method is by way of either sudo or doas, whichever is setup on your system, and this will temporarily use your user's credentials/password to do a root only task, for that single task. sudo will also log all such actions, doas may also (I am uncertain-- it is newer, an OpenBSD tool ported for FreeBSD).

As for doing precisely what you wish, as I have had no desire or need for it myself, I cannot say specifically how. It is documented if you look for it, probably with relation to xorg, xauth and other related things. I wish you success with your search and your ultimate decision.

Post Reply