LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-12-2011, 10:06 AM   #1
debcam
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Is there a secret to loging in as "root"?


I have a Debian system on which I have installed "root" as a separate user, as probably most people do, and I have specified a password which I am sure I remembered well, because when the system occasionally asks me for that password for certain specific tasks, there is no problem. The problem occurs when I try to LOG IN as "root", and there is nothing on earth I can do to convince the login screen that I am indeed "root". Now I know I have the right password, I have the right CAPS and everything, so the only thing left I can think of is that I am not giving the right user name. Is there a special way to identify yourself as "root"? I remember when I was taking Novell classes there was a way to specify a user using "$" (example: $root$ ), or maybe there is a trick of some sort, do I have to use capitals, or a capital R? Right now I am just thinking of reinstalling and eliminating Mr. Root because I can't do anything with him. Have I missed something obvious?
 
Old 03-12-2011, 10:13 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You aren't supposed to be logging in as root. If you need root-level permissions, use sudo. If you feel you absolutely must have long-term access to the root account, then you can switch over to root from the command line with the "su" command.

But you don't log in directly as root, especially not though the GUI.
 
1 members found this post helpful.
Old 03-12-2011, 10:14 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Do you want to login in the GUI ?
Root can't, and shouldn't login in the GUI.
Login as a user and use su to do admin tasks

Kind regards
 
1 members found this post helpful.
Old 03-12-2011, 10:21 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
As you see in replies before my reply, the usual advise is do not login to a GUI session as root. That might be good advise. I don't happen to agree with it nor follow it myself. But I don't want to argue about it.

It should be your choice. Knowing that this might be a bad idea, you still should be able to learn how to do it. It appears that two or more independent settings might be blocking root GUI login, so you might need to do more than one enable action. Two that I found on a quick google search were:

Quote:
To permanently enable root login to gnome under Debian, edit the
/etc/gdm/gdm.conf file.
In the [security] section of the file, add the following line:
AllowRoot=True
and

Code:
sudo passwd -u root
I don't recall exactly which two re enables of root GUI login I needed in KDM/Mepis when a Debian security update took away the root GUI login previously allowed by Mepis. Those were not exactly the two I quoted above (so I haven't tested what I quoted), but since you aren't using Mepis, my finding the exact Mepis instructions I followed wouldn't really help you.

In Linux, I never read email nor visit even trusted web sites as root. That is just my opinion of reasonable precautions. I don't want to argue that these might be either necessary or sufficient precautions for someone else.

Last edited by johnsfine; 03-12-2011 at 10:29 AM.
 
Old 03-12-2011, 03:30 PM   #5
glidermike
Member
 
Registered: Nov 2005
Location: Toronto Canada
Distribution: Debian
Posts: 90

Rep: Reputation: 16
Well, one thing you can do is open a root terminal applications-accessories-root terminal (password required) then type in "nautilus" you can then poke around your system using the nautilus file browser with root access. Of Course if you delete or modify a file you had better know what you are doing or you will be pooching your system!
 
Old 03-12-2011, 06:26 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
On my Debian, at the login screen, I can click Actions at the bottom of the screen and select "Configure the Login Manager." Somewhere under one of the tabs, there is an "Allow local administrator login" checkbox.
 
Old 03-13-2011, 01:14 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
It is really the hot plate deal. You get burned on it once and you will never do that again.

I just can't believe that anyone would not follow best practices at all times. (since I was burned) A best practice is a task or function that helps protect data. Log in as root is considered a security risk. While it is simple to do on some distros, more hardened systems will now not allow it. The best practices you learn and use will be simple enough to do on test boxes so that you are not tempted to do it later.
 
Old 03-13-2011, 01:49 PM   #8
brmccarty
Member
 
Registered: Jan 2011
Location: Cayce, SC
Distribution: Mint 13 Xfce
Posts: 65

Rep: Reputation: 0
I have had many tell me that it is a bad idea to log into a gui as root. That said I have done it on occasion to avoid typing in the password repeatedly if I am making changes that require root privileges. To do this in Slackware I simply type root for the user name and enter the password.
 
Old 03-13-2011, 10:50 PM   #9
debcam
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Smile

Hi. I'm the guy who asked the question in the first place, and I have to thank everyone for their generous contributions of ideas. I have solved my problem in another way since then, for I have decided to re-install my Linux system on a separate machine where I will feel free to experiment with it at will without being afraid to crash it. For me, logging in as root is a necessity since I don't have enough knowledge of THE_CODE to be able to wreak havoc on my machine through the terminal only. I need to have big tools in my incompetent hands. I was actually trying to delete a Linux partition from within Linux, and of course, it was defending itself. I eventually made it from within Windows, and of course I wasn't able to start Linux after that. But that's not a problem, my files were very well backed up, and I simply re-installed Debian, and life goes on. What happened to taking risks in this world? What's the use of owning a system if you can't feel free to crash it once in a while? Anyway, like I said, I must thank you again, and the next time I have another irresponsible idea, I'll know where to look for support.
 
Old 03-14-2011, 01:32 AM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by debcam View Post
I need to have big tools in my incompetent hands. I was actually trying to delete a Linux partition from within Linux, and of course, it was defending itself.
If you want an easy to use GUI tool for managing partitions, check out the Parted Magic live CD: http://partedmagic.com I have used Parted Magic to create, delete, and resize partitions. It is quite reliable as well as easy to use.

Partitions need to be unmounted before you can mess with them. That is why it was "defending itself".

Alternatively, you could just open a terminal from within Debian, then use
Code:
su -
to become root. Then unmount the partition (as long as it is not the root partition that you wanted to delete). Then use cfdisk to delete the unwanted partition.
You then may have to edit your /etc/fstab to make sure each line in fstab is still pointing to the correct partitions.

Last edited by tommcd; 03-14-2011 at 01:48 AM.
 
Old 03-25-2011, 11:03 PM   #11
brmccarty
Member
 
Registered: Jan 2011
Location: Cayce, SC
Distribution: Mint 13 Xfce
Posts: 65

Rep: Reputation: 0
Quote:
Originally Posted by debcam View Post
What happened to taking risks in this world? What's the use of owning a system if you can't feel free to crash it once in a while? Anyway, like I said, I must thank you again, and the next time I have another irresponsible idea, I'll know where to look for support.
That's why I use me old P III to experiment with. I don't depend on it so if it gets crashed no big rush. Although been using it quite a bit the last couple weeks. Haven't had time to fix my Windows 7 that recently crashed.
 
  


Reply



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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 05:56 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Dell's "secret Linux fling" not so secret LXer Syndicated Linux News 0 01-11-2007 09:33 AM
wpa_supplicant confused on psk="secret password" gimmee Fedora 2 12-23-2006 05:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:03 AM.

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
Open Source Consulting | Domain Registration