LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   logging in as root (https://www.linuxquestions.org/questions/ubuntu-63/logging-in-as-root-897303/)

p3aul 08-14-2011 06:39 PM

logging in as root
 
Is there a policy on this forum about not discussing how to login as root on ubuntu. I wish to do this for private reasons, mostly because I've been told in the Ubuntuforums.org that it is not allowed to even discuss this topic. So if this is your policy too, I want to be aware of it. I know all the arguments against it but I want to do it anyway.
Thanks,
Paul

ramkatral 08-14-2011 06:50 PM

Okay, I have never even come near Ubuntu, but I'd like to ask an honest question here. You have to go through a special procedure to login as root in Ubuntu? WTF? Are you not simply presented with a login screen where you have the option of logging in as whomever you wish?

TobiSGD 08-14-2011 06:54 PM

It is allowed to ask that on this forum. But I doubt that you fully understand the reasons why it is not encouraged to login as root to a GUI for everyday use, otherwise you wouldn't want to do it.

But anyways, at first you have to unlock the root-account, since Ubuntu hasn't the root account enabled by default. You can do that with
Code:

sudo passwd root
and specifying a password. After that you have to enable root login in the settings your display managers settings. Since I don't use GDM (which I assume that Ubuntu is using in the recent versions) I don't know how to do that.

Edit:
Quote:

You have to go through a special procedure to login as root in Ubuntu? WTF? Are you not simply presented with a login screen where you have the option of logging in as whomever you wish?
This is not only in Ubuntu, but in almost all distros. As said above, Ubuntu (and most derived distros) doesn't have an active root account by default. And it is for obvious reasons not encouraged to login as root to a GUI. Some distros, like Fedora, will even not work properly when you do that.

rokytnji 08-14-2011 06:55 PM

Not sure I understand your question?

http://blog.sudobits.com/2011/04/23/...-ubuntu-11-04/

ramkatral 08-14-2011 07:11 PM

Yet another thing that makes me thankful to be a slacker...

widget 08-14-2011 07:47 PM

With out setting up a root account you can log in as root by booting to recovery and logging in there and then, at the prompt;
Code:

sudo su
and then
Code:

startx
You can also do this at the normal login screen by hitting Ctrl+Alt+F2 and using that tty login as above.

It is still a rather silly thing to do. I do it on occasion though as there are things it is easier to set up that way. Just don't for get where you are and break something.

MTK358 08-15-2011 12:18 PM

Quote:

Originally Posted by p3aul (Post 4443010)
So if this is your policy too, I want to be aware of it.

Not at all. Ubuntu is the only distro I know of that does this.

Quote:

Originally Posted by p3aul (Post 4443010)
I know all the arguments against it but I want to do it anyway.

Code:

sudo passwd
Anyway, It's perfectly OK to log into a terminal to do stuff as root or use su, but I strongly recommend that you don't log into the GUI as root. If you really want to run a GUI application as root, use "gksu" or "kdesu" from a desktop that's running as a non-root user.

TobiSGD 08-15-2011 12:28 PM

Quote:

Originally Posted by MTK358 (Post 4443642)
Not at all. Ubuntu is the only distro I know of that does this.

Most derivatives also. But the OP wanted to know if it is allowed to discuss the login as root here, since it seems not allowed to do that on the Ubuntu forum.

widget 08-15-2011 04:28 PM

Quote:

Originally Posted by TobiSGD (Post 4443650)
Most derivatives also. But the OP wanted to know if it is allowed to discuss the login as root here, since it seems not allowed to do that on the Ubuntu forum.

It will get your post removed over there. And you get a nasty warning about endangering folks.

I find this strange. Ubuntu is where I have worked in the gui the most as root. In testing you run into times, occasionally, where the user config files are really screwy and will not let you get to the desktop. I am lazy and booting as root will let you edit those files easily.

It is not something I think is a good idea, just a lazy solution to some problems. Certainly would not do that on a production OS.

p3aul 08-15-2011 08:08 PM

Thanks for all your posts! i find this a more user friendly forum than the other. Over there it's mostly the mods I guess. If you don't think like they do and run Ubuntu as the way they want you to, then they really don't want you. Ad that's alright with me. I like Ubuntu, I've installed a bunch of software and I don't really want to do it all over again, but I'll stick with this forum from now on.

John VV 08-15-2011 08:46 PM

there is almost NO reason to need to boot into root
now starting nautilus or dolphin AS root every now and then that is a bit different .

if you NEED to boot into root
use the single user mode

that said .

almost all the time just starting a session of dolphin as root will give you a gui as root .
just do not use it all the time .


ps
fedora also disables root login by default
the not recommended hack also is not recommended , bad side affects

p3aul 08-15-2011 09:32 PM

Quote:

there is almost NO reason to need to boot into root
now starting nautilus or dolphin AS root every now and then that is a bit different .

if you NEED to boot into root
use the single user mode

that said .

almost all the time just starting a session of dolphin as root will give you a gui as root .
just do not use it all the time .


ps
fedora also disables root login by default
the not recommended hack also is not recommended , bad side affects
__________________
-- OpenSUSE 11.3 & Scientific Linux 6.0 --

Yeah, and you should quit smoking and drinking also. And while you are at it lose weight. Bad for the heart! I hear cell phones cause brain tumors and other things. Everybody is so willing to tell you not to do something! that's how they get their kicks out of life.

Thanks,

Paul

John VV 08-15-2011 10:13 PM

before unsubscribing
we do not care about your computer
we care about OURS when yours is rooted and turns into a zombie for a bot herder
when your choice causes US harm THEN .....

widget 08-16-2011 11:06 AM

If you are using Nautilus as your file browser you need to install 2 packages;
nautilus-open-terminal which gives you an option in the right click menu to open a directory in a terminal (no need to "cd").

nautilus-gksu which gives you a right click menu option to open a directory as root. You are asked for your password and then nautilus opens another window in super user mode, in the directory chosen. You can navigate from there to anyplace else you may want to go though.

p3aul 08-16-2011 03:24 PM

I downloaded and installed the two packages but I can't see any difference in my right-click menu. Here is what I have now when I right-click:

Create Folder >
Create Document >
Scripts >
Arrange Items >
Organize By Name
Paste
Zoom In
Zoom Out
Normal Size
Properties

As you see, there are no options to open terminal here or to change to root.

Paul


All times are GMT -5. The time now is 05:04 PM.