LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2007, 09:01 PM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Rep: Reputation: 30
How to reset root password in Ubuntu?


I just got done with installing Ubuntu in VMWare. Installer asked me for a username and password which I can now use to log in and out. Installer never asked me for root password. So, what is the root password, and how can I change it?
TIA
 
Old 12-12-2007, 09:12 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
There is no root password in Ubuntu. Actually, there is not root account at all in Ubuntu. Use the "sudo" command to do admin tasks, for example:

Code:
sudo apt-get update
You will be asked for the password. The password is the same you used to create your user when installing Ubuntu.

You can add a root account to Ubuntu if you dislike the sudo method (which I personally think is great). Just take a look at the Ubuntu guide (which is also worthy bookmarking) about how to enable the root account:

http://ubuntuguide.org/wiki/Ubuntu:Gutsy

Last edited by Mega Man X; 12-13-2007 at 02:41 AM.
 
Old 12-13-2007, 01:59 AM   #3
nirjharoberoi
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 15

Rep: Reputation: 0
use sudo..

sudo <command>

dats it ..

njoy
 
Old 12-13-2007, 02:45 AM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Question

Quote:
Originally Posted by nirjharoberoi View Post
use sudo..

sudo <command>

dats it ..

njoy
Maybe I wasn't clear enough in my previous post was I?
 
Old 12-13-2007, 03:55 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Actually, there is not root account at all in Ubuntu.
The root account is there but its locked so no logins as root are allowed by default.
 
Old 12-13-2007, 04:20 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
sudo passwd?
 
Old 12-13-2007, 05:21 AM   #7
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Yup, root account is there, but it's password field in shadow contains exclamation mark which makes the account unusable (! is not accepted, so it can be used to freeze the password, and therefore the account). To start using root account, simply set a password for it with
Code:
sudo passwd root
as suggested by billymayday.

Note that configuring sudo well and using it is more secure than logging in as root all the time. Having root account "frozen" is a step towards better security. Consider learning how to configure and use sudo, it's really not that bad - vice versa. Also your accidental "I shredded my root directory recursively!" situations might get more rare, because typing 'sudo' in front of a command is more difficult to do by accident than just launch a command and not remember that you were actually logged in as root and did a small typing error (maybe you wanted to shred the two files inside the current working directory, but forgot to put a dot in ./ and therefore shredded your root directory - this wouldn't happen, of course, if you didn't have privileges to do that - if you didn't type 'sudo' in front of the command).

Security and secure system is one thing, a secure user and secure habits are another.
 
Old 12-13-2007, 03:04 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I think the OP specifically needs the root password for VMware installation - nothing to do with general maintenance/running.
 
  


Reply



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
Reset Root password hbenway AIX 9 08-19-2008 04:13 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
how to reset root password bsisol Linux - Server 1 01-15-2007 06:10 PM
reset root password powah Linux - Security 5 09-15-2006 01:30 PM
Reset Root password sdsouza Linux - Software 5 11-12-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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