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...
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...
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
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

    • It's about to become harder to turn off your Samsung TV, thanks to Instagram by Aditya Tiwari Meta announced that its Instagram for TV app has arrived on Samsung TVs in the US as part of its latest expansion, giving users one more way to scroll through Reels. The social media giant often comes under scrutiny for the "addictiveness" of its features, which leads people to spend excessive time on the platform. Interestingly, Instagram boss Adam Mosseri described spending 16 hours on the platform as "problematic use" but not "clinical addiction." Mosseri also compared scrolling on Instagram to binge-watching a show on Netflix. Instagram for TV is now available on Samsung TV models released in 2020 or later. The app is already available on Amazon Fire TV and Google TV in the US, which together account for the majority of connected TV devices. The company said it will test several new features to improve the living room and family experience while using Instagram on the big screen. Watching vertical videos on a big screen isn't something many would be excited about. Probably that's why Meta is testing a dedicated home for horizontal videos. Creators will get the opportunity to design content for TV screens and get more ways to reach audiences, according to Meta. If you found an interesting Reel while doomscrolling on your phone, you'll be able to cast it to your TV. The feature is available for testing on Instagram for TV on Google TV and Amazon Fire TV, and it will also support videos from the Saved tab. Instagram for TV will be testing Channels organized around user interests, across genres such as comedy and sports, as well as content from favorite creators. Moreover, you can watch Stories on your TV. While Instagram is known for short-form videos, it's knocking on more doors to keep the audience hooked. The company said it's exploring new content formats for the big screen, including long-form creator content to cover topics in detail, episodic series to build suspense across multiple episodes, and creator live sessions on TV. All of the new updates put Instagram in competition with established giants like YouTube (and Netflix), which already have a robust presence on the big screen. In recent updates, Instagram added the ability to write an individual caption for each carousel image, manually re-order posts, and a paid version of the app.
    • I know RAM and storage prices are high right now, but I think it would have been better to have 1TB as the base level storage, especially as it's supposed to be for gaming. Plus a 2.5gbe ethernet port rather than only 1gbe.
    • I have installed the debloated version of Windows 11 25H2 Pro. I obtained the apps from store.rg-adguard.net. The size of the Photos app window is quite problematic for me; it consistently displays in a 16:9 aspect ratio, resembling a movie theatre screen, and cant remeber its last size and position. The Snipping Tool cannot capture the taskbar. When I select "Window" in capture mode, it allows me to capture menus or individual windows, but I am unable to capture just the taskbar. This functionality was available in version 24! I am on the same version numbers (latesst).
    • I'm already seeing my steam library, still swallowing the 16 Gb of RAM, then looking at the SD storage expansion and saying "what?".
  • Recent Achievements

    • Dedicated
      tuben earned a badge
      Dedicated
    • Week One Done
      mnsgroup earned a badge
      Week One Done
    • Conversation Starter
      sumytbe earned a badge
      Conversation Starter
    • One Year In
      B4dM1k3 earned a badge
      One Year In
    • One Year In
      DarkWun earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      511
    2. 2
      +Edouard
      203
    3. 3
      PsYcHoKiLLa
      97
    4. 4
      Michael Scrip
      82
    5. 5
      neufuse
      67
  • Tell a friend

    Love Neowin? Tell a friend!