Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-16-2013, 07:47 PM   #1
Registered: Jul 2011
Posts: 62

Rep: Reputation: Disabled
Change the root password

I logged in as root. but when i try to change the password using passwd command nothing happens.
when i check the return value using echo $? it returns 1.
help me
Old 02-17-2013, 12:32 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,189

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
without knowing the distro you are using ...

for example
if this it Ubuntu 12.10 there is NO root password ( just your normal user's )
if fedoea 18
-- the logging in as root --- bit will require the pam hack ,IF by "logging in" you mean to the GUI -- Gnome3
And that will cause problems

see :
passwd --help
--- and ---
man passwd
to quote the manual page
Password Changes
If an old password is present, the user is first promted for it and
the password is compared agaisnt the stored one. This can be changed,
depending which PAM modules are used. An administrator is permitted
to bypass this step so that forgotten passwords may be changed.

After the user is authenticated, password aging information are
checked to see if the user is permitted to change their password at
this time. Else passwd refuses to change the password.

The user is then prompted for a replacement password. Care must be
taken to not include special control characters or characters, which
are not available on all keyboards.

If the password is accepted, passwd will prompt again and compare the
second entry against the first. Both entries are require to match in
order for the password to be changed.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 07:27 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:35 AM.

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