How to enable "login as root" in kubuntu

Asked by pms

How can I enable root login from the login window in kubuntu 10.10? Please explain it using the GUI
NO COMMAND LINE.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

It's not advised nor supported in Ubuntu. Neither is it even needed. If you want a root terminal just run:

sudo -i

https://help.ubuntu.com/community/RootSudo

Revision history for this message
Ubuntux❤️ (ubuntuxedo) said :
#2

Type in kuser to start up the KDE User Manager. Double-click on the root entry to bring up the account properties and uncheck the Account Disabled checkbox. Click OK to save the changes.

Also you can, open /etc/kde*/kdm/kdmrc file with root permissions or simply run "kdesudo kate /etc/kde*/kdm/kdmrc".
Change 'AllowRootLogin' option to true. Save and log in again.

Login as root could cause lots of security problems. If you could explain why you want to login as root, I could come up with a better, confidential solution.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Don't advise people how to enable the root account please

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

This is an important point, so I'll state it here as well as (with more detail) later in my post: Enabling root logins does not increase your degree of control over your system--as an administrator, you can already run any command or program as root.

I'm not sure the method described by Cihan actually works (without additional steps), since the root user account is disabled via its entry in /etc/passwd. If root logons are enabled in KDM, that just means KDM allows them, not that it ensures they will succeed, and since there would still be no password which is correct for root, it seems unlikely that this method would make it possible to log in as root.

The page actionparsnip linked to in his first post was written with care, and is an important part of Ubuntu's community documentation. It explains how sudo works and why it is considered good to use sudo (or the appropriate graphical frontend) and bad to enable root logins. It also tells you how to enable root logins, if you insist on doing so; perhaps more importantly, it tells you how to re-disable them afterwards:

https://help.ubuntu.com/community/RootSudo

Three important points (but not a substitute for reading that page):

(1) You **do not** have to enable to root account to run things as root. There is really no administrative task that you cannot do without enabling the root account. For the root account to be disabled means that you cannot **log in** as root, not that you cannot **run programs and perform administrative tasks** as root. You can even simulate nongraphical root logins with "sudo -i" if you need to, or simulate the most common behavior of "su" with "sudo -s". (Even those techniques are not recommended, however, except in situations where they are particularly useful; the regular way of using sudo, i.e., "sudo <command>", is sufficient for the vast majority of nongraphical administrative tasks.) Actually logging in as root exposes you to unnecessary risk, in part because it encourages you to run more programs as root than are necessary, and ensures that you do so (e.g., background programs).

(2) The instructions on the linked-to RootSudo page are geared toward Ubuntu rather than Kubuntu; in Kubuntu, you'll generally want to run graphical programs using kdesudo rather than gksudo/gksu. But the reasons for using sudo and its graphical frontends rather than logging in as root apply equally well to a Kubuntu system as they do to an Ubuntu system.

(3) If you do choose to enable the root account--which I again emphasize that you very probably shouldn't do and pretty certainly don't have to--then if you want to log on as root graphically (rather than logging on in a virtual console or becoming root with the su command), you might have to perform the steps Cihan detailed. But logging on *graphically* as root is especially bad, because you're running the graphical user interface and numerous graphical programs as root unnecessarily, substantially magnifying the risk associated with security vulnerabilities in those programs (and also making it really easy for you to make mistakes with them and break your Ubuntu system). Furthermore, since you're not "supposed" to log in as root, there is little to no testing done with graphical root logins, which means you may encounter usability bugs. Off the top of my head, an example of one such bug is bug 685215 (though that is specific to GNOME rather than KDE, and that bug occurs no matter how users-admin is run as root, though it's only likely to be a real problem if you're logged in as root).

Please feel free to ask for help if you're having trouble using sudo and/or its graphical frontends (gksu, gksudo, and kdesudo). Along the lines of what Cihan said at the end of his post, if you can tell us what task you feel you need to enable root logins in order to accomplish, we can probably tell you how to do it with sudo/kdesudo.

Revision history for this message
eugene fallatik (phins52s) said :
#5

 ok i am very annoyed with the Linux makers
point 1: If I am using a live cd I AM THE ADMINISTRATOR
         permissions should be open
point 2: I test any distro for functionallity BEFORE i insall
         NO SENSE INSTALLING SOMETHING THAT WON'T WORK
point 3: root access is needed for complete testing
         blocking this is not user friendly
         makers say they crave newbies,this is the kind of thing
         that chases them away!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

This is an Ubuntu thing, not Linux. Many other distributions have accommodated the sudo method (as has Windows since Vista). Others allow root login but it's simply not necessary.

As I stated before you can get root access by running 'sudo -i' and you will be root, so it's not blocked at all. If you simply prefix your commands with sudo they run as root and you will and already have full system access.

Revision history for this message
Jeff Trull (jetrull) said :
#7

It's not completely crazy to need root login access. I got here because I needed to run a "plasma widget" (which is not a standalone program you can run from the command line) as root in order to test whether a bug was permission-related. It used to be possible to log in from kdm as root, and is no longer. Having this documented somewhere is important.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

then use kdesu and it will run as root. again, no need to log in as root.

Can you help with this problem?

Provide an answer of your own, or ask pms for more information if necessary.

To post a message you must log in.