Forgot Administration password,How do I changes password

Asked by John Boyd

I forgot Administion password. How do I change password?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
enubuntu (mr.tennents) said :
#1
Revision history for this message
John Boyd (fordman61) said :
#2

This was no help at all. trid it three times each way .No help at all

Revision history for this message
John Boyd (fordman61) said :
#3

this didnot solve my question

Revision history for this message
enubuntu (mr.tennents) said :
#4

What's the problem?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

There are lot of answers similar to your issue here https://answers.launchpad.net/ubuntu/+source/sudo

Revision history for this message
Jesus M Diaz (jesusm) said :
#6

try:

$ sudo bash --login
(you'll get a shell as root)

then:

$ passwd
(you'll be able to change the root password without asking for the old one)

good luck

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#7

@John Boyd
Is your problem solved, or do you still need help with this? There is troubleshooting that can be done, if the above proposed solutions were not successful.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

So, I just read over this thread more carefully, and I can tell you that you should *not* follow Jesus M Diaz's advice from post #6 (as numbered at https://answers.launchpad.net/ubuntu/+source/shadow/+question/168443). It will probably not work (you will need to type in your administrator password to run "sudo bash --login"), which is actually good, because if it did, it doesn't actually do what you want (it does not reset your administrative user account's password). Instead, it enables the root account, which is considered undesirable and which is unsupported on Ubuntu. Please see https://help.ubuntu.com/community/RootSudo for details.

Instead, given that the technique posted by eNry was not successful, if you still need to reset your password you can do it as follows.

First, try https://help.ubuntu.com/community/LostPassword#The_Other_Way. (If you find those directions confusing, then after it says "Your system will boot up to a passwordless root shell," you can start following the instructions at http://www.psychocats.net/ubuntu/resetpassword.)

If that doesn't work, then in your Ubuntu system, open a Terminal window (Applications > Accessories > Terminal) and enter this command exactly (you can copy and paste it)

mount | grep ' on / '

and press enter to run that command. You should see something like:

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)

The part you're interested is the device name before "on" (in this example, it's /dev/sda1). Remember that, or write it down.

Now boot the computer from an Ubuntu Desktop Install CD (you can burn the .iso image to a CD or DVD, or write it to a USB flash drive and boot from that) and select Try Ubuntu. When the desktop comes up, run the Terminal and, in the Terminal window, run:

sudo mount /dev/sda1 /mnt

If the device name was different from /dev/sda1, put what you saw instead. Then run the commands:

sudo chroot /mnt
passwd USERNAME

Replace USERNAME with your actual username. This will enable you to type in a new password. Enter your new password twice, as it requests. It's OK that no placeholders characters (like *) appear while you're entering your password.

Then run these three commands:

exit
sudo umount /mnt
exit

The last of those commands quits the Terminal window. Reboot the system by clicking the power icon on the upper-right corner of the screen and clicking Restart. Make sure to remove the CD before the system boots up again, so that you can get into your Ubuntu system on the hard disk. Now that you've reset your password, you should be able to authenticate when necessary.

Revision history for this message
John Boyd (fordman61) said :
#9

Thank you for your answer but the computer now is blank and doesnot respon
to any thing now.
----- Original Message -----
From: "Eliah Kagan" <email address hidden>
To: <email address hidden>
Sent: Monday, October 31, 2011 11:30 AM
Subject: Re: [Question #168443]: Forgot Administration password,How do I
changes password

Your question #168443 on shadow in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/shadow/+question/168443

Eliah Kagan proposed the following answer:
So, I just read over this thread more carefully, and I can tell you that
you should *not* follow Jesus M Diaz's advice from post #6 (as numbered
at
https://answers.launchpad.net/ubuntu/+source/shadow/+question/168443).
It will probably not work (you will need to type in your administrator
password to run "sudo bash --login"), which is actually good, because if
it did, it doesn't actually do what you want (it does not reset your
administrative user account's password). Instead, it enables the root
account, which is considered undesirable and which is unsupported on
Ubuntu. Please see https://help.ubuntu.com/community/RootSudo for
details.

Instead, given that the technique posted by eNry was not successful, if
you still need to reset your password you can do it as follows.

First, try https://help.ubuntu.com/community/LostPassword#The_Other_Way.
(If you find those directions confusing, then after it says "Your system
will boot up to a passwordless root shell," you can start following the
instructions at http://www.psychocats.net/ubuntu/resetpassword.)

If that doesn't work, then in your Ubuntu system, open a Terminal window
(Applications > Accessories > Terminal) and enter this command exactly
(you can copy and paste it)

mount | grep ' on / '

and press enter to run that command. You should see something like:

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)

The part you're interested is the device name before "on" (in this
example, it's /dev/sda1). Remember that, or write it down.

Now boot the computer from an Ubuntu Desktop Install CD (you can burn
the .iso image to a CD or DVD, or write it to a USB flash drive and boot
from that) and select Try Ubuntu. When the desktop comes up, run the
Terminal and, in the Terminal window, run:

sudo mount /dev/sda1 /mnt

If the device name was different from /dev/sda1, put what you saw
instead. Then run the commands:

sudo chroot /mnt
passwd USERNAME

Replace USERNAME with your actual username. This will enable you to type
in a new password. Enter your new password twice, as it requests. It's
OK that no placeholders characters (like *) appear while you're entering
your password.

Then run these three commands:

exit
sudo umount /mnt
exit

The last of those commands quits the Terminal window. Reboot the system
by clicking the power icon on the upper-right corner of the screen and
clicking Restart. Make sure to remove the CD before the system boots up
again, so that you can get into your Ubuntu system on the hard disk. Now
that you've reset your password, you should be able to authenticate when
necessary.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+source/shadow/+question/168443/+confirm?answer_id=7

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+source/shadow/+question/168443

You received this question notification because you asked the question.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

That sounds like a different problem, not related to resetting your password. If you want help with it, I recommend posting a new question (https://answers.launchpad.net/ubuntu/+addquestion).

Can you help with this problem?

Provide an answer of your own, or ask John Boyd for more information if necessary.

To post a message you must log in.