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

I just encrypted my home directory using ecryptfs and the instructions from How to Encrypt Ubuntu Home Folder After Installation.

In order to really benefit from the encryption, however, I needed to change to a stronger and longer password for login. Typing in a long password once at login doesn't bother me, but it does get annoying to have to type in such a long password every time I use sudo.

How can I set my account to use two passwords: a strong long password for login and a weaker shorter password for sudo (with an ecryptfs encrypted home folder)?

share|improve this question
really nice question, I also want that! could you do that in the end? – brauliobo Dec 13 '14 at 13:21
@brauliobo Sorry, didn't figure it out yet. If I do, I will be sure to post back here though. – dg123 Dec 14 '14 at 5:56

You can completely remove the need to enter a password for sudo: How to run sudo command with no password?

I don't see any other way though, it's either entering the same sudo password or removing it. I have a long password (about 20 characters) and it doesn't bother me. Also, entering a few sudo commands in succession only requires you to type the password once... It doesn't bother me because my password is easy to type fast. Lots of people make a password too complicated, either to remember or to type. Personally I think this is wrong. If you have a long password that is easy to type, people can't follow your keystrokes when they're watching. If you do have a complicated password that takes time to type. There is lots to be said about passwords and they're never-ending discussions. I'm personally convinced that it's better to use a long password (even using normal dictionary words, including spaces and other punctuation) than a complicated short password. The longer the password, the longer (exponentially) it takes to crack. Using common sentences (e.g. I had bacon and eggs for breakfast.), makes it easy to remember, very strong but also easy and fast to type. You will find people who strongly object because they're all dictionary words, but I can assure you they're more difficult to crack than e.g. P@5s\/\/0Rd, which is considered by most as a very strong password.

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.