LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-12-2005, 05:37 PM   #1
M O L8ingN2dust
Member
 
Registered: Mar 2005
Location: The People's Republic of Lumps in my Oatmeal!
Distribution: Mepis 3.2.1-1
Posts: 104

Rep: Reputation: 15
logging in as root


How do you log in as root in Ubuntu? It never asked me to set the root password, and the password I did choose does not work to login as root. Does it set some kind of default password?
 
Old 11-12-2005, 05:52 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Most modern distributions prevent direct logins as root. Instead, you should use the sudo utility to perform commands as root.
 
Old 11-12-2005, 05:58 PM   #3
M O L8ingN2dust
Member
 
Registered: Mar 2005
Location: The People's Republic of Lumps in my Oatmeal!
Distribution: Mepis 3.2.1-1
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Matir
Most modern distributions prevent direct logins as root. Instead, you should use the sudo utility to perform commands as root.
This is the first distro yet that I have used that disallows that. If that is the case, that is pretty annoying! There are many things logging in as root is useful for. For instance, I have a home partition, and a root partition. If I want to resize my home partition I need to unmount it. I can't unmount it unless I log in as root, otherwise it will be "busy". Using sudo wont help me there.

Also, annoyingly enough, this distro seems to have only created 1 partition and a swap partition. That being the case, partitioning is effectively impossible.
 
Old 11-12-2005, 10:39 PM   #4
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Quote:
Originally posted by M O L8ingN2dust
This is the first distro yet that I have used that disallows that.
Yeah, Ubuntu's unique that way--contrary to the post you were responding to. I haven't found a single other "modern" distro that prevents you from logging in as root.
Quote:
If that is the case, that is pretty annoying! There are many things logging in as root is useful for. For instance, I have a home partition, and a root partition. If I want to resize my home partition I need to unmount it. I can't unmount it unless I log in as root, otherwise it will be "busy". Using sudo wont help me there.
Actually, it will. You just type
Code:
sudo umount /home
Quote:
Also, annoyingly enough, this distro seems to have only created 1 partition and a swap partition. That being the case, partitioning is effectively impossible.
Did you have Ubuntu choose to automatically partition the entire hard disk? Yeah, I've heard it's bad about allocating space. That's why I always choose to manually edit the partition table.

As for sudo... at first I was annoyed with it when I started using Ubuntu, but it's really grown on me. You may want to read this explanation for why Ubuntu uses sudo--there are security and other considerations. I've also learned of some good workarounds that, once you get used to them, actually are more convenient than logging out, logging back in as root, logging out again, and logging back in as user.

For example, if you create a launcher with the command
Code:
gksudo nautilus
you can browse around as root within your user account temporarily. Once you close the browser window, you're back to being a regular user fully. Give it a shot. If you don't like it after a while, you can also enable root (see link above for more info on that).
 
Old 11-13-2005, 08:48 AM   #5
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Rep: Reputation: 49
If you still like to have the root password set on your computer, you can use the passwd utility.

Type passwd root at the terminal, and set the root password.

But still, on a default basis, whenever starting any applications that require root previleges, Ubuntu / Kubuntu will always ask you for your password.
 
Old 11-13-2005, 01:28 PM   #6
M O L8ingN2dust
Member
 
Registered: Mar 2005
Location: The People's Republic of Lumps in my Oatmeal!
Distribution: Mepis 3.2.1-1
Posts: 104

Original Poster
Rep: Reputation: 15
What is Kubuntu? Is it Ubuntu with KDE interface rather then gnome? If so, I am on it!
 
Old 11-13-2005, 04:45 PM   #7
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Quote:
Originally posted by M O L8ingN2dust
What is Kubuntu? Is it Ubuntu with KDE interface rather then gnome?
Yes.
 
Old 11-23-2005, 08:51 PM   #8
number9
Member
 
Registered: Dec 2003
Location: Fresno
Distribution: Gentoo Ricer
Posts: 85

Rep: Reputation: 15
Code:
sudo passwd
 
Old 11-27-2005, 03:04 PM   #9
christopher5
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 64

Rep: Reputation: 15
Go to System Admin -> Users and Groups; select Show All Users; select Root and click edit; type in password and verify

Go to Login Screen Setup; Under Secutiry tab, check Allow Root Login in GDM

and you're set
 
Old 11-28-2005, 04:55 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Amen to everyone who says the Ubuntu "no root" thing is annoying.

Anyone who gives birth to a computer---ie the mother who sets up the SW--had better know how to be a responsible Admin, Root, whatever.

At least they dont prevent you from activating root.........
 
Old 11-28-2005, 07:08 PM   #11
blankdev
LQ Newbie
 
Registered: Nov 2005
Location: Diamond Bar, California
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
Using sudo helps just as well and I think logging into root is far more annoying. Canonical/Ubuntu strongly discourages activating the root account and logging into it, not only because of the usuall 'it's not safe', but because some apps wont run on it (correctly) that way.
 
Old 11-28-2005, 08:07 PM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Using sudo helps just as well and I think logging into root is far more annoying. Canonical/Ubuntu strongly discourages activating the root account and logging into it, not only because of the usuall 'it's not safe', but because some apps wont run on it (correctly) that way.
If doing several things that require root access, it is FAR easier to type "su" and your password just once. Further, its often handy to log in to a graphical session as root so you can drag files around with the mouse. Dont know how to "sudo" in the GUI mode.........

Apps that won't run as root?? What's that all about? Examples?
 
Old 11-28-2005, 08:31 PM   #13
blankdev
LQ Newbie
 
Registered: Nov 2005
Location: Diamond Bar, California
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
I usually do sudo nautilus, and if I must do many windows (for example two if I need to drag from one window to another), do CTRL+SHIFT+T and type it again, etc. etc.

Go to https://wiki.ubuntu.com/RootSudo and scroll down to 'Enabling Root' to find out what I meant.
 
Old 11-28-2005, 08:55 PM   #14
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Code:
gksudo nautilus
is the proper way to do it, and it's far more convenient than logging out of user, logging in as root, making changes, logging out of root, and logging back in as user.
 
Old 11-28-2005, 09:30 PM   #15
ninjabob7
Member
 
Registered: Nov 2005
Distribution: Ubuntu 9.10 and Slackware 13.1
Posts: 78

Rep: Reputation: 15
I don't know what you guys are talking about. What version are you using? When I installed Breezy, the setup wizard asked for a root password, and I can login as root on the virtual terminals. I haven't tried on the graphical system yet.
However, I have had some problems with the GNOME sudo (at least I think that's the problem). When I click on the updates icon, it prompts me for my password, but then seems to quit when I enter it.
 
  


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
logging in as root computerdude Linux - Software 7 09-06-2005 04:38 PM
Logging in as root... The_fuzzy_cow Mandriva 3 11-27-2003 11:47 PM
logging on as root dicom Linux - Software 5 10-29-2003 04:43 PM
Logging on as Root Iain Wilson Linux - Newbie 7 09-16-2003 03:23 AM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:10 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