Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I do not know my administrative password. I read up on how to reset it by clicking left shift after the BIOS page upon start up. going to the recovery option, then root, then doing mount -o rw, remount / but then I believe I must do passwrd to change the password, HOWEVER, my keyboard does not have a working "p" key.

Does any one know of an alternative way to reset the administrative password without the use of a 'p' key? If not, does anybody know of a clever way to utilize the letter 'p' in the command prompt without a working key?

Or perhaps anyone might know how to find out your password without having to change it at all? Thank you for your time.

share|improve this question
This sounds like a fun challenge. – Kaz Wolfe Jan 23 '14 at 2:59

will mean passwd in bash, because $'x70' means p. See here for more info on this feature.

ASCII table here or in man ascii, you need the hex value for the character, for p it is 70 so you produce it with $'x70' .

Or if you already installed zsh and have turned on the interactive menu completion then from a zsh shell you can cd /usr/bin/. And then type ./ and press TAB and keep it pressing/pressed until the interactive menu completion kicks in and then just select passwd with the cursor keys.

Or if you have mc (Midnight Commander) installed you can use that to select /usr/bin/passwd and then press ENTER on it to launch it or ALT+ENTER to copy the selected filename to the command line. (In this case you will likely need the latter as you will have to supply the username also to the command line because you are not changing the root's password but some user's. So simply launching passwd is not want you want.)

Or any similar interactive selection program should work, but obviously these should be already installed on your system as now you don't have access to the admin password so you can't install anything.

Or if you have only passwd in /usr/bin/ which has only one letter before asswd (on a default setup this is true) then of course you can just use bash's globbing features and simply type:


to launch passwd.

share|improve this answer
Veery clever. I applaud you, @falconer – Kaz Wolfe Jan 23 '14 at 2:58

When you need a capital P, hold ALT, press 8 0 (use the keypad)

When you need a lowercase P, hold ALT, press 1 1 2 (use the keypad)

Buy a new keyboard :).

share|improve this answer
could you please elaborate on Alt codes – mcantsin Jan 22 '14 at 22:59
This is a windowsism. Nothing wrong with the answer but doesn't work on linux as is and is just worth a mention. – progo Jan 23 '14 at 8:51
props for the 'windowsism' term @progo – Mihai Oprea Jan 23 '14 at 11:23

The other answers are already quite good - but in a pinch, you can use copy/paste to grab a 'p' from somewhere and paste it where needed. I've resorted to this several times when working with bad keyboards...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.