{ 1 trackback }

what is the default root password in ubuntu
07.09.09 at 1:46 pm

{ 46 comments… read them below or add one }

1 James 09.28.06 at 12:34 pm

I have also found “sudo bash” useful as an alternative to “su”.

2 tom 10.14.06 at 2:35 am

or you could…

sudo passwd root

then enter your user password you created when you installed then you will be asked for the ROOT pasword (2x) enter it here and you can log in as root.
While I appreciate the ’security’ linix (ubuntu) offers – I don’t like being treated like an idiot

Tom

3 nixcraft 10.14.06 at 10:52 am

Tom,

Hee

I understand your point. Not everyone is poweruser. Many user are new; so to avoid damage this sudo thingy was introduced.

Appreciate your post.

4 Joel 12.30.06 at 6:49 pm

thank-you for the post Tom this has helped a gr8 deal. We can definately appreciate what ubuntu has done with the sudo command to help bring more windows users to the linux environment. Thank-you ubuntu!!!

Joel

5 Ranjith 08.04.07 at 2:57 pm

Tom,
Thanks for the post. I was breaking my head for the past 1 day on how to login as root. I mostly work on Networked systems in Office and I was worried I couldnt login as root even on my home pc.

Thanks again!!

Ranjith

6 Greg 12.17.07 at 12:05 am

“sudo su” will also work.

7 Winf 12.20.07 at 11:43 am

hi guys

unfortunately

i always seem to get ” username is not in the sudoers file”
or when i try sudo su etc i get “sendmail: fatal:open /etc/postfix/main.cf: no such file or directory”

any help overcoming this for a new user would be great.

thx in adv
W

8 madis 02.25.08 at 8:45 am

well i have a problem…i can’t use sudo command with my user (id 1000), it starts shouting that you need poweruser rights…

9 Radu Floricica 04.08.08 at 9:16 am

i always seem to get ” username is not in the sudoers file”

Same here. Apparently it’s a known bug. The quickest fix is to install, from the optional servers, only OpenSSH. Don’t install lamp, mail, dns or any of the others. You cand of course add them later with apt-get.

10 Bob 04.11.08 at 5:49 pm

Hmmm…either I don’t have any idea what I’m doing or nobody else does. I think it’s safe to say the problem is me.

I’ve installed Ubuntu 7.04 numerous times, and each time without exception when I’m prompted for the root password (whether because I’m trying to log in as root or because I’m running the SU command) and I type in the password I specified for my user account, it doesn’t work.

I can repeatedly log in as myself using my password without any problems at all. But as soon as I type SU in a terminal and I type that VERY SAME password in, Ubuntu won’t take it.

Sorry, but I have a hard time reading post after post saying my user password is, by default, the same as the root password, when Ubuntu doesn’t seem to think so.

Again, I’m sure the problem is me, but I have no idea what to do.

Thanks,
Bob

11 vivek 04.11.08 at 6:39 pm

Bob,

su command is outdated. You need to type the following command to become root user (enter your own account password):
sudo -i
or
sudo bash

HTH

12 venkat 06.30.08 at 3:24 pm

in ubuntu linux you can unlock the root user by resetting the root password

use

sudo passwd root

(This will ask for the sudo user password and then the new UNIX password, which will be your new root password)

once password is reset do

su – root

and enter the new root password it should take you in as root.

13 Kathy 07.04.08 at 3:13 am

thanks a bunch! Have been learning Linux/Ubuntu for a class and using a Live Cd. Couldn’t use the su command but with your post was able to get to the root and complete my lesson!
Thanks again.

14 Greg 08.18.08 at 12:45 am

You didn’t answer the question.

15 Mike 09.23.08 at 5:00 pm

“MICROSOFT!!!!” doen’t protect you from your administrator account. Where is the FREEDOM that Richard Stallman talked about Freedom to mess my system up if i want to??

16 dave 11.04.08 at 12:45 pm

UAC in vista prevents a local administrator from running their shell\environment with their administrative ‘token’ during normal use. If they perform an admin task, UAC prompts the ‘administrative’ user to click ‘Continue’ or equiv (thus temporarily ‘grabbing’ their admin token).

If user is NOT a local administrator, they must enter credentials of a local administrator.

Kind of like sudo…. ish.

Vital move on MS’s part. And over time will get users into the right from of mind eg. principle of least privilege – if they know it or not.

Windows users have been used to having ‘full access’ by running as administrators. also means they get broken computers more quickly!! that has had to change.

brings windows more inline with *nix security model. which can only be a good thing imho – everybody wins except the malware authors.

windows boy through and through (enterprise admin for 6 yrs), just starting my journey into linux and chose ubuntu. a few frustrations but loving it so far.

17 mr.fucaway 12.01.08 at 4:59 pm

////////////////////////hi\\\\\\\\\\\\\\\\\\\\\\\\
#include
int good day () {

printf (“i have one question
are there any one can
give me cure to solved
my problem i wanna be
login as root nothing
a less are this
available on Ubuntu
so what my question i
repeat is i can login
root itself not as
root ? i wait for
answer !!!!!!!!!!!!\n”);
}

18 Ryan 12.24.08 at 5:32 am

i installed linux but i put a password on the root and made the admin acount that i started with a limited acount and i cant get in to the root and cant access what i need in the limited account any guesses i’ve tryed everything you guys suggested but still cant get in

19 bla 12.26.08 at 11:25 pm

mr.fucaway:

error: function "main" is missing
error: function good: day is a bad input.. shall it be "good (day)?" Still.. the variable "day" is undeclared
error: function "int good" doesn't return any value

20 Muhammad Danish Khan 01.02.09 at 1:15 pm

Hello all,

I have installed ubuntu 8.10. it working fine but there is problem that whenever i reboot my system it not retain all the values those i setup last time.
e.g Network IP setting , proxy setting even the softwares those i installed last time.

it just makes ubuntu like fresh install

how can i fix it
please tell.
Thanks,
Muhammad Danish Khan

21 Vivek Gite 01.02.09 at 1:59 pm

@Muhammad,

You must be booting from CDROM.

Once booted, you need to install Ubuntu on hard disk and after that remove disk from a CDROM.

22 mr.fucaway 01.31.09 at 8:47 am

Sorry for late
And by the way my problem
Is solved with ubuntu how ??

It’s simple to set root password
Write this command

username@localhost-desktop:~$ sudo root
[sudo] password for username:

here put your own password ok
output system must be as this

username@localhost-desktop:~$ root: command not found

Now you are resetup root password
Root in ubuntu not support for
Login gui mode so you must
Allowed to adimistrator login gui gnome
write this command
gksu /usr/sbin/gdmsetup
And enter your own password
Go to tap security and do check on this
Allow local system administrator login
Now just close and press Crtl+Alt+Backspace
Now you logout and login with root and your password
Good luck for all
e-mail is mr.fucaway@gmail.com

23 Alan 02.24.09 at 2:31 pm

On the “root” login issue – I have just loaded ubuntu 8.1 (downloaded the install CD, booted from CD and hey presto an OS that actually works! a machine that is ten times faster than (spit) Vista! Anyway I digress, having remembered some Unix stuff from long ago I did the following:
sudo passwd root
(Enter my OWN login password)
you are then prompted for your UNIX password
(enter this twice)
you are now superuser root
(exit to return to normal user)

Please be aware you can do lots of damage as superuser so only use if absolutely necessary and exit as soon as possible! Oh by the way I really love the multiple “Desk” options, I now have one for browsing, one for mail, one for other work and one showing Wallace & Gromit films.

ALL HAIL THE DEATH OF WINDOWS

24 andrea 03.25.09 at 1:07 pm

I thank Tom for suggesting the
$sudo passwd root
command. (That’s what I was looking for, an answer to:
Q: can a generic sudoer change root password, or not because of some security reason? )
I agree that an user with non-so-bad linux skills should run this command just after any ubuntu scratch installation, and have an “ordinary” superuser account, to use with consciousness when doing big administration stuff. However, it’s my impression that the “sudoers-thing” is not bad, even if you know what you are doing… sometimes you just want to be super-user for a single command (e.g. “sudo synaptic”)

25 modwerdna 04.17.09 at 2:07 am

Ok, so if I understand this , root user is protected and no one can login that way?

But if that’s the case- why did my mass storage slave hardrive get installed that all it’s files are as root ownership. That makes it so that I cannot set permissions on any of those files?

26 StevenCP 05.18.09 at 11:32 pm

Believe it or not, this is a rather annoying issue.

Let me say this: This assumption that Ubuntu makes in limiting access using what amounts of vague commands to the novice user is redundant, as the novice user doesn’t know anything about the vague commands of Unix, Linux, etc.

Having personally worked with Unix for over 25 years, I find my situation infuriating to say the least.

So, here’s the deal: I did a moduser and changed my groups. Unfortunately I forgot to include the ‘admin’ group in the -g list, thereby (and I am assuming here) I was removed (?) from the sudoers file.

So, my one and only user no longer has admin privs and/or cannot access sudo because of this file. So, I cannot mod users, modify the sudoers file, update, or just about anything without the #$%^$#@ root password (see first note above.)

So, reading this page has been somewhat amusing since at least one person has stated (without any solution) that they do not have access to modify the suoders file. I hope there is a simple solution to this, because if I have to reinstall the system I am really not going to be happy.

For you techies, think of this as a semaphore-resource lockup issue.

The duality of the sudoers file without a secondary command to change that file without actually requiring the file is… shortsighted, and obviously remains and issue based on the number of posts regarding this issue.

27 Vivek Gite 05.19.09 at 12:09 am

No need to reinstall OS. You can reset and gain root / admin level access. See Ubuntu Linux Restore admin / root level permissions

HTH

28 StevenCP 05.19.09 at 2:13 am

Thank you. That did it…

Seen on a global level, I understand that there is a need for security and to try to prevent certain actions that a typical user might screw up. However, Linux (as a mostly command-driven OS) and even in its GUI form is a bit more difficult to permamently screw things up with all the command-line options.

If you were to *cough* take Vista as an example of an OS trying to be more intelligent than the user and continually ask questions that either the knowledgeable user may know, or the noob wouldn’t know anyway – it just doesn’t work. Trashing your system is a right and a priviledge; we shouldn’t force the user to make security decisions. After all, that’s how you learn – mess up the OS a few times and you WILL learn. And if you’re in a position of authority to blow away something important, well, that’s why there is backups that no one really ever does either…
My $.02

29 Ubuntu je zakon 06.01.09 at 5:50 pm

Ubuntu is the best OS, but I use Kubuntu, Ubuntu with KDE!
Ubuntu.jezakon.com

30 MarSys 06.03.09 at 2:31 pm

I have doubt… Can someone unlock my root account remotely?

Thought that the user account created on the installation steps was the root.. but no! :(
Anyway-.. it’s better to lock root instead of leaving it unprotected (with no password) like on some old linux distributions..

31 cipher 06.27.09 at 6:09 pm

Ubuntu normally restricts access to the the root account and we have to run the sudo command to execute all commands . So how do we break out of this .
reboot your system and boot the ubuntu box in RECOVERY MODE . then choose the option root shell with networking .
now one u select thats the system will boot to the root shell ( almost like the single user mode with networking )
Note : Its might try to set up networking ,just wait for sometime .

the one youe reach the hash prompt i.e # gibe the commands passwd n change the root password
# passwd
Enter New root password …
And Hurray ! one ur logiin to your ubuntu account
give su – and your new password for root and u get a roots prompt #

32 Bob Swift 07.10.09 at 2:49 pm

The problem for administrators who are NOT command line experts is that all the nice GUI support that is available cannot be used easily. Every time I try to do something I need as an administrator, I can’t do from the GUI. Either I have to google the equivalent sudo command or find the GUI tool name and run gksudo to run it with more authority. Then I have a desktop with multiple tools open some with more authority than the other. Same for other tools like pgadmin. A Windows administrator wouldn’t put up with that for long.

33 Jon 07.24.09 at 3:39 pm

i just wiped my system of Microshaft Vista. proud to be a new user of Ubuntu on a laptop that only ships with Vista. im generally in Centos but i wanted something a bit lighter for my laptop. i even bought a Solid state drive for my laptop just for my selection of linux, which is now Ubuntu. i just spent the last 20 min trying to log in as root also. thanks for the SUDO info. ill just have to remember not to type Sudoku…lol

34 digit 08.13.09 at 10:58 pm

thans a lot!!!

=D

Bytes…

35 Dickson Rwehumbiza 08.17.09 at 11:43 am

I was being driven mad when i couldn’t log in as root on my own PC and also i was limited to run some of crucial commands.But the commands, “sudo bash”,has restored my joy when am in Ubuntu environments.
Thanks a lot Ubuntu.

36 neetu kour 08.27.09 at 6:25 am

Ubuntu How do I login as root user,how do I Login as root password

37 jay 08.31.09 at 5:21 pm

Thanks worked for me, my computer is at home, no one will ever use it but me. I need to use a WYSWYG HTML editor to build a web page. If i could not log in as root my software could not get at any of my files. what a pain in the neck !!!

38 graham 09.10.09 at 1:48 pm

This ubantu system makes windows vista look pretty good for functionality and ease of use. The rest of it becomes a horror story of authorisations command s which will not work and are totally not necessary. It will never challenge windows as it is not user friendly and the average user doesnt wont to spend all day trying to get permission for this and that with his own system.Even the entry screen is missing an easy to load menu.
This system is written for totally computor literate operators who see it as a programming hobby and not as an easy to use tool. Cant even put the correct time on the clock without authentication/authorisation………..someone do us all a favor and get rid of this stupid feature which totally ruins the user experience
The only easy bit about ubantu is that it loads easy and there it ends

39 Monica 09.18.09 at 2:56 pm

I understand that using linux as root can be dangerous, but I just installed it and I need to create a password for the root. I can not leave root with like no man’s land, because it would be even more dangerous.

Understand that considerations about being root or not is second place when you have just installed the system. What you want most at this time is to make your system secure.

40 @graham 09.18.09 at 8:53 pm

Graham,

I couldn’t disagree more. There are other distributions of linux out there which are very difficult for a user, for example, CentOS is terrible. A great server, but terrible workstation. I’m still a Linux noob, and I’ve had no trouble with Ubuntu so far. Sure I’ve had to Google a few things, but overall it’s very user friendly. While I agree that Ubuntu won’t ever have the market Windows has, I think that’s mostly because of a lack of exposure. Sure you have to get used to the menus and things look very different, but overall, I think Ubuntu is the perfect OS for a basic user who wants to be able to browse the web (safely), send e-mail, and create documents without selling their children into slavery to pay their Microsoft bill. As for typing in the password to make system changes, there are ways around that, Google is your friend. Also, I’m not sure how older versions may be, I’m speaking from my experience which has been on version 9.04. Good luck.

41 lao-zhao 10.15.09 at 6:31 am

Very useful. Just want to summarise ways to become root in ubuntn :
sudo bash
sudo -i
sudo passwd root
enter bew UNIX password (your password)
retype your password
passwd: password updated successfully
then type su – and password
you become root
next time when you want to become root you do not need to use sudo
just su-
after you add new user, each user can become root by using su -
hope i make it clear

42 sara 10.28.09 at 5:29 pm

welcome
how i can access the root without password (hacking)
in fedora

43 sas 12.16.09 at 9:56 am

hi
i forget my password in ubuntu
how to chang it without known before password?

44 vinit 01.12.10 at 5:39 pm

thanks buddy

45 Mike 01.22.10 at 3:45 pm

what are the advantages an dis advantages of root login account

46 Mike 01.22.10 at 3:47 pm

please emplane

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All