UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: The People's Republic of Lumps in my Oatmeal!
Distribution: Mepis 3.2.1-1
Posts: 104
Rep:
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?
Location: The People's Republic of Lumps in my Oatmeal!
Distribution: Mepis 3.2.1-1
Posts: 104
Original Poster
Rep:
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.
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).
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.
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.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.