I'm working on a Ubuntu 10.04 (Lucid Lynx) system using a Panasonic CF-50 Laptop. My Client has completely forgotten his Administrative Password. He doesn't even remember entering one; however it is there.

I've tried the suggestions on the WebSite and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Do you have a solution? I look forward to hearing your response. Thanks for your time and consideration.

link|improve this question
"No matter how many times I press Shift" → Hold down the shift key while the machine is booting, right from the beginning, until you get the grub menu. – Stefano Palazzo Jan 12 '11 at 14:14
2  
are there any sensible reasons why you want access to the data on the machine? – Takkat Jan 12 '11 at 17:09
Well, it is already up and running. There is probably no data per se but the apps are already in place there. I did have a heck of a time installing it on my other box. I just figured I can use a working system if I can just log on. – doug Jan 13 '11 at 4:39
Do you mean Ubuntu's "root" password by "Administrative password" or the user password? What website are you refering to? – Lekensteyn Jan 30 '11 at 14:59
you should accept Jorge Castro's answer it is the best and the only way to rest root password :) thanks, – Achu May 16 '11 at 12:29
show 1 more comment
feedback

9 Answers

By default the first user's account is an administrative account, so if the UI is prompting you for a password it's probably that person's user password. If the user doesn't remember their password you need to reset it. To do this you need to boot into recovery mode.

Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:

enter image description here

Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.

Now you should see this menu:

enter image description here

Using the arrow keys scroll down to either root or netroot (doesn't matter in this case) and then hit Enter.

You should now see a root prompt, something like this:

root@ubuntu:~#

Now we can set the user's password with the passwd command. (In this example I will use jorge as the example, you need to substitute whatever the user's username is):

passwd jorge
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~#

Type in what you want the new password to be at the prompt. After it's successful reboot the machine and the user will be able to log in with their new password.

link|improve this answer
This method didn't work for me on my 11.10 system. In another answer to this question I showed what did work for me, but this method is better, safer, &c ⋯ and should be tried first! – keepitsimpleengineer Dec 2 '11 at 21:09
Thanks this trick worked for my specific case with 11.10. – iammilind Feb 16 at 9:29
+1 Excellent, detailed answer! This worked on my 11.04 VM, thanks! – BryceAtNetwork23 Mar 22 at 12:11
This answer didn't work, however the following blog post helped (read also its comments): blog.troyastle.com/2010/06/… – Arne Evertsson May 18 at 8:36
feedback

Yes you can change the old password via Grub

  1. If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup

  2. If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the shift key

  3. From the boot menu, select recovery mode, which is usually the second boot option.

  4. After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it

  5. Once you're at the root shell prompt, if you have forgotten your username as well, type ls /home (small letters & not capitals). This will list all the user accounts in your set up.

  6. To reset the password, type passwd username where username is the username you want to reset eg. passwd mysterio in my case

  7. You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

  8. Now the password should be reset. Type exit to return to the recovery menu.

  9. After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Hope this helps. Sorry I couldn't add images as I'm on my phone

link|improve this answer
1  
Great answer; very consice – puddingfox Apr 1 at 3:08
feedback

Ubuntu does not come with an Administrative password. There is only one initial account, the user account, which can be used to execute administrative tasks. For example, to get a root shell you run

$ sudo su -
[sudo] password for myuseraccount:         # here you type the user's password
# 

A lot of people that have Unix background or experience with other distributions stumble on this issue quite often.

The command

su 

will always fail because the root account is locked; it cannot be accessed directly or you cannot login directly to root.

There are great advantages in using the sudo facility.

link|improve this answer
As a long time Unix/Linux user, the first thing I did on my first Ubuntu system was to unlock the super-user account. On the many installations since, I do not. Jorge knows of what he speaks. – keepitsimpleengineer Dec 2 '11 at 21:06
I answered the question; Jorge did some editing ;-) – user4124 Dec 3 '11 at 16:23
And ⋯ user4124 knows of what he speaks 8¬) – keepitsimpleengineer Mar 19 at 16:41
feedback

I was able to use Jorge's method - the one above with the nice screen shots - with a few minor changes. I'm using Ubuntu 11.10

First, when booting up - don't press the left shift key until the BIOS screen goes black and then immediately press and hold the left shift key.

Then, after perhaps a minute and a number of lines of text scroll on the screen, I got the first menu, but with a couple of fewer lines - I chose the second line.

Then I got the Recovery Menu - but when I chose Drop to Root Shell Prompt (bottom item) I was root but couldn't reset the password - because the disks were Read Only. Type exit and get back to the Recovery Menu

There was a choice (not shown on Jorge's screen shot) to Remount Read/Write Used the down arrow to go to it, then left arrow to get to and Enter - and it mounted the disk RW.

Then again to Drop to Root Shell Prompt and I'm root and can write - so passwd username had me enter the desired password twice - then exit to go back to Recovery Menu Resume normal boot and everything worked fine with my new password! I'm the only account on this box, and my password works with sudo so I apparently have Administrative Privileges.

This was less exciting than editing /etc/shadow but I was glad to trade the excitement for a nice ending.

link|improve this answer
feedback

If Jorge's method didn't work for you, as it didn't for me, here is another method. I had to try something different because:

  1. My USB keyboard did not work at the root prompt ⋯ probably hardware either keyboard or mainboard. The fix I used was find an old PS/2 keyboard (the little round plug) and use that.

  2. When I used passwd username to change my password, it failed because of a bad token or such. This called for drastic measures.

The Drastic Measures

This is a very dangerous thing to do! Jorge's method should be used; only do this in case that method doesn't work.

Do this at your own risk. It did work for me on my 11.10 system.

The idea is to set the user's password to blank (or null) - this allows you to just press Enter at the Password: prompt.

Still at the root prompt from Jorge's method, first remount the root file system as read-write by using this command:

mount -o remount,rw /

  • Now you are a super-user on this system. Tread lightly.

Then edit the password shadow file to remove the encrypted password for your username. Type in…

nano -B /etc/shadow

The nano editor will display the contents of the file. Each line will have the form name:⋯:⋯:⋯… where ⋯ is a string or null (empty). One of the lines will start with your username. The first ⋯ after your username is your encrypted password. As an example:

username:$1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0:14920:0:99999:7:::

where $1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0 is the encrypted password.

Carefully delete the encrypted password leaving the all the ":"s, so it looks like this:

username::14920:0:99999:7:::

Then type Ctrl-O, hit the enter key to save, then Ctrl-X to close nano.

Reboot and you will have an empty (or null) password. Be sure to use passwd username in a terminal to set or reset your user password.

Source for PS/2 workaround was here.

Sources for the drastic measures were here and here.

Note on nano ― the -B option makes a backup of the original edited file, same name with a"~" appended.

link|improve this answer
You can also use this method by booting with a different disk and editing /etc/shadow after mounting the appropriate disk. – David Mar 29 at 23:52
feedback

reboot the machine in single user mode.

http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

link|improve this answer
feedback

No, there is "no way" to retrieve the old password.

Yes, you can change the password without knowing the old one. The process is described on several sites on the net, easily found via a search ( http://www.google.com/search?client=ubuntu&channel=fs&q=change+frogotten+password+ubuntu&ie=utf-8&oe=utf-8 )

If you do that however and happened to have used an encrypted /home-directory for that username you are likely not to gain access to the files in your /home-directory (and if you do then Ubuntu should be uninstalled...)

link|improve this answer
feedback

First, you have to reboot into recovery mode.

If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup. enter image description here From the boot menu, select recovery mode, which is usually the second boot option. enter image description here After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

Once you're at the root shell prompt, if you have forgotten your username as well, type

ls /home

That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Susan Brownmiller's password.

To reset the password, type

passwd username

where username is the username you want to reset. In this case, I want to reset Susan's password, so I type

passwd susan

You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset.

Type exit

to return to the recovery menu.

After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

source

link|improve this answer
feedback

Somehow booting into recovery mode did not work for me because it would not boot into the root system. And when I tried to change the root password it asked me for the root password, which I didn't have. An alternative to this problem is using UXterm which is a simpler version of terminal and seems to have root system capabilities. Just type in "passwd" and enter your new password and it's changed.

link|improve this answer
feedback

protected by Community Apr 10 at 0:46

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.