LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-18-2013, 05:08 AM   #1
kalidha
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Rep: Reputation: Disabled
change root password


Hi,
Could someone tell me how to change the root password?
I tried using "passwd" but it did not work.
Thanks!
 
Old 01-18-2013, 05:26 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
As root:
Code:
echo "root:<password>" | chpasswd
 
Old 01-18-2013, 05:28 AM   #3
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Here the basic syntax for passwd:
Code:
NAME
       passwd - change user password

SYNOPSIS
       passwd [options] [LOGIN]

For a more detailed info read the man for passwd
Code:
$ man passwd


Regards
 
Old 01-18-2013, 06:37 AM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
First thing is, you should be root to change root password. So switch to root user and then invoke:-
Code:
~$ passwd
OR 
~$ passwd root
For NIS based system you should try:
Code:
~$ passwd -r nis <username>
OR
~$ yppasswd <username>
Also once go through manual page.

Last edited by shivaa; 01-18-2013 at 06:43 AM.
 
Old 01-18-2013, 06:38 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Which distro are you using? If it's Ubuntu or an Ubuntu derivative, the root account is disabled.
 
  


Reply


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 05:12 AM
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Cannot change root password (let alone standard user's password) jbottiger Red Hat 4 01-06-2009 08:03 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 02:02 AM


All times are GMT -5. The time now is 07:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration