This question already has an answer here:

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)?

marked as duplicate by muru, karel, Fabby, waltinator, Thomas Aug 18 '18 at 8:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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. – DJG 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.

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