How to enable the root account in Ubuntu


Recommended Posts

Ubuntu is one of the few Linux distributions out there that will not enable the root account.In case you want to enable root login on your Ubuntu system this post will show you how you can do that.

As you have noticed during the Ubuntu installation there was no question about the root password,as you might have been used to see during other Linux distributioninstallation process. This is why the root account is inactive andcan?t be used (no password configured) until we will setup a properpassword for it. To do this, we simply need to run:

sudo passwd root

This will ask for a new root password and once you confirm it, you can start using the root account to login.

In case you will want tdisable back the root accounb>t, just lock the root account by running:

sudo passwd -l root

Are you aware of any other Linux distribution that doesn?t enablethe root account at installation time? I am just curious because Ibelieve that this is a great idea? but I haven?t seen it implemented inother distributions.

  • 2 weeks later...
  drygnfyre said:
Thanks, this was a useful how-to. Although I've found that with Ubuntu, you really don't need to create a root user, since you can just use sudo.

Distro's don't run as root as standard because its pointless and dangerous. A big plus in Linux is the security, if you run as root you throw that security down the drain :)

  • 2 months later...
  Phixion said:
Distro's don't run as root as standard because its pointless and dangerous. A big plus in Linux is the security, if you run as root you throw that security down the drain :)

I'd have to agree with you. This is one of the biggest criticisms of Linspire and its derivatives, the fact that by default, you're running as a root user. The way I see it, anything that you could possibly need to accomplish with a root account can be and/or should be done with sudo.

personally, I prefer to do the above, then keep logging as as my user and when I need root access, I just su it, then I don't have to annoyingly type sudo everytime I need to write a line in. Just makes it a bit handier for me without killing my security

  • 2 weeks later...

you guys know you can just sudo su *password* and it will give you a constant root prompt right? that way you don't have to sudo over and over if you have a bunch of commands.

sudo su *password* gives you a root terminal, do your work, close out, no need for a root login.

  • 10 months later...
  • 6 months later...

I ran into the similar issue where it would not let me edit the Menu.1st file Said I was not the owner- Tried opening with Sudo but to no avail-

I added a user then changed them to member of root- then logged off. Then signed in as the newly created user then I opened a command prompt- typed whoami and it said I was then root. Changed the Menu.1st file.

Because at the Sign in screen for some strange reason Ubuntu will not let Root have a desktop- but will allow a User in the root privilages can.

I hope this helps. BEFORE ANYONE SAYS IT I KNOW_ Resurecting an Old thread but I found another way to do this where still allowing you to maintain the User status but allowing you not to have to Type Sudo before everything.

The reason I had to do this... Is because even with the Sudo Su "Password" open editor- To change the Menu.1st it said I was not the owner and would not allow me to save.

But by creating the New User "Admin" then making him a member of Root. I was able to sign in with a full desktop and use the Text Editor to change and save the file.

Edited by redvamp128
  devilotX said:
you guys know you can just sudo su *password* and it will give you a constant root prompt right? that way you don't have to sudo over and over if you have a bunch of commands.

sudo su *password* gives you a root terminal, do your work, close out, no need for a root login.

That's a good tip that I had not thought about. Using sudo to call up su, brilliant!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I know quite a few people who use it exclusively. Can't type a lick so they just talk to phone and let it fly no matter how garbled.
    • The dumb side of online service games that don't really count as a MMO. There should be offline modes for these games with MP as a option. It's really a co-op game when you think about it, unless my memory is off?
    • Until they release 13.x, and then you'll be dumping on 7.x like you are 2.x. Sad but true...
    • EA shutting down Anthem servers soon, making the BioWare game unplayable by Pulasthi Ariyasinghe In early 2019, the RPG studio BioWare attempted a complete genre switch by releasing Anthem, a cooperative multiplayer game focused on seasonal content drops. In the end, the title failed to reach EA and fan expectations. Despite a revival attempt, BioWare quickly ended support for the title. Now, its servers are about to go down soon, and that means it's the last chance anyone has to play the online-only experience. In an official blog post regarding the game's future, it was revealed today that Anthem's online services will be shutting down on January 12, 2026. Starting today, all in-game premium currency purchases are also being halted, but any remaining credits held by players can still be used in the store until the shutdown date. "We have an important update to share regarding Anthem," said the post. "After careful consideration, we will be sunsetting Anthem on January 12, 2026. This means that the game will still be playable online for the next 180+ days." As there is no offline mode attached to the co-op game, it will not be playable by those who purchased it following the January 12, 2026 date. Interestingly, EA Play subscribers will lose access to the game ahead of that date, with it leaving the subscription service (also affecting Xbox Game Pass Ultimate and PC Game Pass) on August 15, 2025. The last time Anthem was mentioned by EA and BioWare was in 2021, which is when the companies announced the cancellation of the rework. The team working on this Anthem NEXT project was then moved to the developer of the Mass Effect and Dragon Age games. "We deeply appreciate your dedication, passion and support over the years and we’d like to thank you for that," added BioWare. EA has also confirmed that Anthem's shutdown is not affecting any jobs at BioWare. "No, the sunsetting of Anthem has not led to any layoffs," it said.
    • Apple has long had their own version; claiming they're "scanning for CSAM" as a justification for monitoring your entire device content, not just messages: https://www.youtube.com/watch?...W50ZXJuZXQgcHJpdmFjeQ%3D%3D An open-source Linux phone would be the real solution...
  • Recent Achievements

    • Dedicated
      solidox earned a badge
      Dedicated
    • Week One Done
      solidox earned a badge
      Week One Done
    • Week One Done
      Devesh Beri earned a badge
      Week One Done
    • Week One Done
      956400 earned a badge
      Week One Done
    • First Post
      loose_observer earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      459
    2. 2
      ATLien_0
      161
    3. 3
      +FloatingFatMan
      149
    4. 4
      Nick H.
      66
    5. 5
      +thexfile
      61
  • Tell a friend

    Love Neowin? Tell a friend!