LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 02-16-2013, 07:47 PM   #1
thirstonlinux
Member
 
Registered: Jul 2011
Posts: 51

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
Guru
 
Registered: Aug 2005
Posts: 12,061

Rep: Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573
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 )
or
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 :
Code:
passwd --help
--- and ---
man passwd
to quote the manual page
Quote:
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.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 02:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration