Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 05-04-2011, 04:42 AM   #1
Sameer Kedare
LQ Newbie
Registered: Apr 2010
Location: India
Distribution: Fedora
Posts: 1

Rep: Reputation: 0
password change

HI all,

Want to set root password

i don't have any idea as from where to get a root password. as I have freshly install Ubuntu10. Sudo cmd is working out.

How to go in single user mode in Ubuntu.

Thank you
Sameer Kedare
Old 05-04-2011, 04:49 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello and Welcome to LinuxQuestions,

Ubuntu is against the use of the root account for security reasons, so they haven't set a password for it. The root account is not something to play around with, you should use sudo for your maintenance tasks. I'm not sure since I don't use Ubuntu but normally if you'd run
sudo su -
you get a root shell. If you really want to go into single user mode (do you mind indicating why?) then you could run
init 1
from that root shell.

Read why Ubuntu doesn't favor the use of the root account and password here and here. Have fun with Linux.

Kind regards,

Old 05-04-2011, 08:54 PM   #3
Registered: Oct 2008
Posts: 33

Rep: Reputation: 4
In Ubuntu, you can also get a File browser with root permissions to start up by clicking Accessories;Terminal and entering the command:

gksudo nautilus

You can then edit anything you want in this browser.
Old 05-04-2011, 09:49 PM   #4
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 14,521
Blog Entries: 24

Rep: Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993
Another alternative is to use sudo su. Then you can retain root privileges until your administrative tasks are done without having to keep re-entering passwords.

If you search LQ, you will find ways to create a root password in Ubuntu so you can just su.

I frankly consider Ubuntu's position on this issue to be silly. It penalizes competent and careful users for the sins of the incompetent and careless.

But that's just me.
Old 05-05-2011, 01:56 PM   #5
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
This is D E B I A N Forum, not Ubuntu Forum.

Thank you!
Old 05-11-2011, 01:18 AM   #6
Registered: Feb 2011
Distribution: Ubuntu 10.04, Debian Squeeze
Posts: 46

Rep: Reputation: 8
If you still want to set a root password in Ubuntu, simply do the following:

$ sudo passwd
Enter new UNIX password:
And you've got yourself a root password. It's one of the first things I do when setting up an Ubuntu-based server. I'm sorry, but tagging sudo onto every command gets old--and I can never get used to using "sudo su".


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to change root password without knowing the grub password ramesh.mimit Red Hat 8 10-15-2011 06:12 AM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 03:02 AM
Locking out a user when password expires, but allowing them to change their password kaplan71 Linux - Security 5 06-27-2008 08:12 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 10:39 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration