LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2005, 12:22 PM   #1
chrissanders
LQ Newbie
 
Registered: Nov 2005
Location: Murray, KY
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Logging in as Root Interactively


I just installed Ubuntu on my laptop and would like to login as root, but it tells me that the system will not allow me to login as this. I have the password right because i can use it to run updates and use the "su" command when need be, but what do i need to change to allow myself to log on as root interactively?
 
Old 11-21-2005, 12:26 PM   #2
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
i take it you mean logging into a GUI as root??

This is generally considered a big no no in any Linux system. Some distros (like Ubuntu) disable this feature to stop people borking their systems.

Maybe if you say why you are trying to login to a GUI as root we can help suggest an alternative (safer) method
 
Old 11-21-2005, 12:44 PM   #3
chrissanders
LQ Newbie
 
Registered: Nov 2005
Location: Murray, KY
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
basically I am just wanting to do it for my own learning purposes. I know the first instance I came to where i needed to do it was moving some files into a directory it said i didnt have rights to. I am always open to alternate means of doing things, but either way, being able to log in to the GUI as root is something i would like to know how to do just for my own learning purposes if nothing else.
 
Old 11-21-2005, 12:55 PM   #4
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Well to move files as an example you can open a terminal and type:

su - used to log in as the super user (root)
then enter the root pass, your prompt should now change.

You are now logged in as root so be very careful what you poke around it.

to copy files you can then do:

cp <path/file> <destination>

As for logging in to the GUI edit your profile showing your distribution, that will help, you also need to say whether you are using KDE/Gnome etc.
 
Old 11-21-2005, 01:03 PM   #5
chrissanders
LQ Newbie
 
Registered: Nov 2005
Location: Murray, KY
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
I am using Ubuntu with Gnome
 
Old 11-21-2005, 07:38 PM   #6
chrissanders
LQ Newbie
 
Registered: Nov 2005
Location: Murray, KY
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
So does nobody have an answer to this one?
 
Old 11-21-2005, 08:38 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Use sudo and su togetherm e.g. sudo su - will give you a root shell nicely.
 
Old 11-21-2005, 11:18 PM   #8
chrissanders
LQ Newbie
 
Registered: Nov 2005
Location: Murray, KY
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
But again, that is just from the command line, so it isnt really answering my question. The original question being, what change needs to be made to allowe me to log in as root interactively.
 
Old 11-22-2005, 10:40 AM   #9
benben_shen
LQ Newbie
 
Registered: Nov 2005
Location: Singapore
Distribution: Ubuntu / Debian
Posts: 26

Rep: Reputation: 15
I am new to Linux too~~~

From what I understand, Linux or may be i should say those OS built on Linux Kernal, trying to protect Linux from disasters, so basically what they do is to restrict that from GUI, you don't really have a way to delete those files under root so easily, and for me is like hoping people just give up those funny ideas like deleting all files under /usr. haha.

Well, I have ever tried just Shift-Del everything inside the system32 folder of windows, and it works. The next time my roomate start PC...well bascially everything not right.

So, i will feel it is a protection to the system, although minimum. The protection offered is even less than force to enter username and password at starting up.
 
Old 11-22-2005, 11:34 AM   #10
Padma
Member
 
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808

Rep: Reputation: 30
I don't know how ubuntu "protects" root, but in Mandriva, you can tweak some settings to allow you to log in as root. *However*, many "normal" things appear to be disabled, to prevent you from shooting yourself in the foot.

Face it, there is almost no real need to ever log in as root to the graphical level. I know of only a few rare instances where something couldn't be done from a "su" terminal.
 
Old 11-22-2005, 11:51 AM   #11
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
to interact with files graphically, try entering this in a command line.

su
(enter the password)
nautilus

that should bring up nautilus and enable you to interact with files as root.

I know with KDE, there is a thing called kdesu, which allows you to open any program as root, but prompts you with a password dialog box first.

I think it's gksu, but don't quote me on that, as I don't use Gnome.
 
Old 11-22-2005, 12:47 PM   #12
Haystack
Member
 
Registered: Nov 2005
Location: Utrecht, Netherlands
Distribution: Gentoo, Ubuntu
Posts: 65

Rep: Reputation: 15
Somewhere in your Gnome menu (thought it was Applications->System Tools) theres a Login Screen Setup... There's a tab for security, with a checkbox "allow Root to login with GDM" or something like that.
That will do the job...

I still don't understand why the whole linuxcommunity is so scared of logging in as root... Okay, you can screw things up, but does that mean you can't with su ? One typo and you're stuck... Does anyone have some examples why it's so bad logging in as root?
 
Old 11-22-2005, 01:10 PM   #13
jameson
Member
 
Registered: Oct 2005
Location: in my room
Distribution: slackware
Posts: 51

Rep: Reputation: 15
Just because something can be done from the commandline doesn't mean it should be. I can do as much damage from the commandline as i can in x (i know theres less chance of it though, but i still can) and having to continually use su is irritating. When not using the internet i quite regularly log in as root to do things, maybe i just like to live dangerously though

If i am logged in as root, does that not mean all processes run by me are run with root priviledges also? if so then that could be why its a bad idea. you don't want some rogue process eating your hd.
 
Old 11-22-2005, 01:35 PM   #14
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
Yes, that's exactly what happens.

When you are logged into X as root, everything you run has root privledges.
 
Old 11-22-2005, 01:39 PM   #15
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
By default, Ubuntu doesn't allow root to log in, either from console or a graphical login. Instead, the first user entered into the system is an admin and can use sudo and their password to do anything root can do. In theory Ubuntu did this to increase security, but I have yet to see a rational explanation of how this improves security.

However, if you want a more traditional root account, Ubuntu has an entry in their FAQ that explains how to set it up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing password non-interactively fili Linux - General 3 11-05-2004 07:10 AM
Remove files non-interactively ar1 Linux - Newbie 3 06-02-2004 07:32 PM
Logging in as root. Khalinsar Linux - Newbie 22 09-15-2003 04:13 AM
Logging In as root DiabloDan Linux - Newbie 6 07-22-2003 04:00 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 03:55 AM


All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration