LinuxQuestions.org
Help answer threads with 0 replies.
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 05-25-2011, 09:41 AM   #1
godoten
Member
 
Registered: Dec 2010
Posts: 36

Rep: Reputation: 0
Question Why not straight answer?


I found a few people asked "How can I login as root on debian?"
but never seem to get straight answer. Why is this? If it has
been impossible to do so then should be said so? If it is still
possible then why not give the straight answer? Could anyone
here give us the answer?
 
Old 05-25-2011, 09:45 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
1. Assign the root account a password if it does not have one already
2. Log in as root
 
Old 05-25-2011, 09:52 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Sure.

There are three ways, (1) if there is a root home directory (which usually would be /root), you can simply log in with userid "root," enter the root password, and there you go; (2) use sudo (in which case you don't log in as root but become a temporary super-user; (3) use su -, enter the root password, and there you go.

Here's the rub -- if you don't know the root password (and are not an approved "sudoer," you ain't goin' anywhere.

Here's the other rub: RTFM for su and sudo so you'll an understanding of what goes on and why (if you don't know what FTFM means, try wft rtfm).

Hope this helps some.
 
1 members found this post helpful.
Old 05-25-2011, 09:53 AM   #4
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
Quote:
Originally Posted by godoten View Post
I found a few people asked "How can I login as root on debian?"
I'm not sure how the actual Debian does it ... But I have a distro built on Debian, and to login as root is simple:
__________________
Username: root
Password: *******
__________________

It had me set up the root at install. As in I choose the password ... And then had to setup another user so I wouldn't always be on root.


Maybe it is like the Ubuntu root, which you have to edit the sudousers, log on through terminal with a command (I think it is gksudo, but I am to lazy to verify that right now), enter password twice, and then you can log as root. ||-Please note I am paraphrasing here, this is FOR SURE not 100%-||

I don't think any distro would make it impossible to log in as root ... I am still pretty new, so I don't know how correct this is or if it helps, But I hope it did. Good luck.

Last edited by Hevithan; 05-25-2011 at 09:54 AM.
 
Old 05-25-2011, 09:54 AM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Or, from a regular user's login session:
Code:
$ su -
--

Alas, I am too slow to respond to this hot topic.

Last edited by anomie; 05-25-2011 at 09:56 AM.
 
Old 05-25-2011, 10:37 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I think the OP means logging in as root to the GUI, which is disabled by default in Debian. That people in most cases get no straight answer to this is, in my opinion, because those people mostly seem to be not aware that logging in as root to a GUI can be a real security risk. Many people, especially newbies, seem to want to be root because they:
1. Do not know how to start graphical applications as root.
2. Don't understand the use of su or sudo.
3. They are annoyed of typing their password/root's password, because they didn't have to do that on Windows.

IMHO, in this cases it is better to explain the security risks and how to avoid them instead of giving a plain answer and endanger their systems with that.
 
1 members found this post helpful.
Old 05-25-2011, 10:51 AM   #7
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
Quote:
Originally Posted by TobiSGD View Post
3. They are annoyed of typing their password/root's password, because they didn't have to do that on Windows.
Isn't there the 'keyring'? You type the pass and get access ... Or is root just not allowed to enter at all-and why?

Quote:
...as root to a GUI can be a real security risk.
How so? Isn't the point of being root to be able to access everything, if and when needed? what security issue could arise?

Sorry I'm asking questions about your post Tobi, But this arose my curiosity.
 
Old 05-25-2011, 11:05 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Most distributions disable root login via the desktop (i.e GUI) by default because it is not recommended for security reasons and also not safe practise.

As stated you can use su or gksu

AFAIK it is still possible.
 
Old 05-25-2011, 11:06 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Hevithan View Post
Isn't there the 'keyring'? You type the pass and get access ... Or is root just not allowed to enter at all-and why?
Yes, the keyring will help with that issue, but is not installed per default in all distros, and you will have to type in your password at least once, which seems to be too much for some people.

Quote:
How so? Isn't the point of being root to be able to access everything, if and when needed? what security issue could arise?
At first, the problem actually is that you are able to access anything as root. Any malware will also have access to anything. And there is the problem that you will be allowed to change anything in the system. If you try that as unprivileged user you will not be allowed to do that. This way you will recognize that you are accessing a system file, which is a thing to think twice about.

Have a look at this forums, in the last weeks I remember at least four threads where people "accidentally" deleted necessary files (sometimes whole folders) or changed all permissions in a system folder (and sometimes in the whole system) to 777. Both renders the system unusable or at least unbootable and would have been avoided when the user would work as unprivileged user. that way he would have given an error message or at least a password dialog, which every time should be a thing to make someone to think twice about the wanted action.
 
1 members found this post helpful.
Old 05-25-2011, 11:22 AM   #10
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
So it's just a way for the system to say 'don't jump on that bed, You could break your head'? ... Preventative measures just to warn that it is important for operation? <<(these are not real questions, rhetoric ... It just looks like the punctuation that belongs)

I can see how that would be a benifit.
 
Old 05-25-2011, 11:51 AM   #11
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Hevithan
So it's just a way for the system to say 'don't jump on that bed, You could break your head'?
If we're talking analogies, I think it would be more accurate to say something like, "Don't eat the pillow. You may get indigestion."

Logging in to a full-on DE (desktop environment) as root means every single program you run will be executed as - root. Your word processing application, your audio player, and that big, buggy monstrosity referred to as a web browser all run with enough privileges to damage your system. Totally unnecessary and dangerous. (Kind of like eating a pillow. At least jumping on the bed is fun.)
 
1 members found this post helpful.
Old 05-25-2011, 12:23 PM   #12
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by godoten View Post
I found a few people asked "How can I login as root on debian?"
but never seem to get straight answer. Why is this? If it has
been impossible to do so then should be said so? If it is still
possible then why not give the straight answer? Could anyone
here give us the answer?
The short answer to your question: LinuxQuestions.org is not a private one-on-one support forum. Even if you say "tell me how to log in to GUI as root, I am aware of all the security risks, please give me the straight answer and spare me the security lecture," I must assume that other people will read the archived thread, who might not have your level of security expertise, and therefore I feel obliged to give a general-purpose answer that is fit for public consumption.
 
1 members found this post helpful.
Old 05-25-2011, 12:47 PM   #13
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Another way to look at this is that once you understand linux well enough not to be a security risk (to your system and others) you will not need to ask the question. This will be for two reasons. First Linux follows very logical patterns and once you have a good working understanding of those basic patterns you can usually figure out how to do most things faily easily. Second, once you reach that stage, you will understand that there is no reason(excluding extremely rare cirumstances) to ever need to login as root(gui).
 
2 members found this post helpful.
Old 05-25-2011, 01:12 PM   #14
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
1) Because there is no real reason to login to Gnome/KDE as root.

But to do it all you need to do is change a setting in gdm/kdm.

Some of us find it easy to work as root access instead of sudo. To permanently enable root access to your Debian/Gnome desktops edit the /etc/gdm/gdm.conf file. In [seurity] section Allow root by setting the value to True. Once you’re done with it, you need to reboot or just restart the gdm for the change to take effect.

Here is the sample configuration: (You can also find remote root access settings)

[security]
# Allow root to login. It makes sense to turn this off for kiosk use,
# when you want to minimize the possibility of break in.
AllowRoot=true

# Allow login as root via XDMCP. This value will be overridden and
# set to false if the /etc/default/login file exists and contains
# “CONSOLE=/dev/login”, and set to true if the /etc/default/login
# file exists and contains any other value or no value for CONSOLE.
AllowRemoteRoot=true

The settings are also in the GDM and KDM GUI.
Or for kdm edit /etc/kde4/kdm/kdmrc

Never had a reason to login to the desktop as root in the seven years I have ran Debian.

For opening apps like pcmanfm/konqueror/dolphin etc as root, that is what gksu/sux/sudo are for.

I fail to see why it is so difficult to type a root password to do these things. Why are people so lazy that typing a password is so hard for them to do?

Last edited by craigevil; 05-25-2011 at 01:15 PM.
 
Old 05-25-2011, 02:02 PM   #15
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by craigevil View Post
Never had a reason to login to the desktop as root in the seven years I have ran Debian.
And I have hosed a Debian system by logging into the desktop as root. Looking back on the experience, I really wish I had been more patient and learned the correct way to administer the system. But Debian led me to Ubuntu and Ubuntu led me to Kubuntu, where I have found happiness and prosperity until now (long may it last!).

Which brings another thought to mind. Windows traditionally gave all users the equivalent of root access. It wasn't until the NT family that any distinction was made between users beyond simple desktop customizations. It wasn't until Vista that Windows began prompting before performing potentially risky operations, and many Vista users' solution was to disable even that.

People coming from Windows are accustomed to having automatic administrative rights. Instead of telling them how to hose their systems, it might be better to gently educate them about some of the differences between the two systems.

TLDR version
http://linux.oneandoneis2.org/LNW.htm
 
  


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
On Boot up: it goes straight through to XP liam_atkins Linux - Newbie 12 08-08-2005 03:49 PM
straight-foward answer: printing through parallel port mrchaos Linux - Hardware 7 06-27-2005 04:38 PM
So let me get this straight... habala Linux - Newbie 5 01-05-2005 08:28 AM
I have Searched high and low on here and can't get a straight answer thebover Slackware 6 09-09-2004 10:17 AM
can I go straight from 2.4-2.6 kernel? LavaDevil94 Linux - Software 4 04-03-2004 11:26 AM

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

All times are GMT -5. The time now is 08:09 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
Open Source Consulting | Domain Registration