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 recently forgot my user password from a relatively fresh Ubuntu 13.04 installation (dual-boot with Windows 7, latter more heavily used). During setup, I had selected the encrypted home directory option but unfortunately skipped the step asking me to record a passphrase.

I managed to set a new password for my account by booting into single-user mode, but as described in "can't login after password change (ecryptfs)", I am thrown back to the login manager when trying to use my new password. The answer to aforesaid question linked me to Annoyance changing password with Ecryptfs, which suggests running ecryptfs-mount-private, but unfortunately that merely returns ERROR: Encrypted private directory is not set up properly.

Does Ecryptfs set a default passphrase in such instances, or if not, is there any other way to recover my data? (Said data largely consists of a few saved image files and Oolite savestates, so I wouldn't mind a total loss that much … but it's the principle that matters here.) If not, would the easiest way to get a usable system again be a partition wipe and reinstall? (In this case I would probably want to delete the single partition set by Ubuntu setup and define multiple partitions myself ― advice on what amount of swap space is recommended on a 64Bit system with 8GB RAM would be welcome.)

share|improve this question
To diagnose "is not set properly" error try running ecryptfs-verify -p – Petr Gladkikh Aug 31 '14 at 8:25

Not sure about recovery options, but as far as getting a usable system, you should be able to reformat the /home partition (since it should be a separate partition, due to the encryption). I haven't really dealt with separate /home partitions much, so not sure what else you'll need to get a usable system. If you have root, you should be ok. If you haven't set a root password (which is generally not recommended, but can be handy if you know what you're doing), I'm not entirely sure how you'd go about getting your user account setup on the fresh /home partition. You may need to research reformatting /home partitions.

The other option is to just reinstall, as you mentioned, and honestly from the sound of it, it won't be that much more painful for you to do it that way, considering you didn't seem to have much going on with your current install.

Oh, by the way, you may want to create a data storage partition. There are two good reasons for this. One, you can have a shared partition that both Windows and Ubuntu can access for media files. Two, if you ever need to wipe one of the OS's out, or get locked out like you have here, the files will still be accessible. Of course, if you want it to be shared, you'll need to make it an NTFS partition, and then setup a UserMap, so that Ubuntu and Windows know which permissions to

As for swap, with that much RAM, you really don't need that much, probably anywhere from 4 to 8 GB should be more than large enough (and I think you can skimp by with as little as 256MB). Swap is important, but you really don't need that much.

share|improve this answer
I was planning on creating a data storage partition, that's why I mentioned repartitioning. I haven't used NTFS to share data between Linux and Windows systems before, though (in the past I mainly used FAT32 for that). Could you point me towards a guide on setting up UserMaps for that purpose? – user184852 Aug 17 '13 at 11:45
I know this is late, but here's a couple resources on setting up a usermap: and – superlinkx Sep 12 '13 at 11:56

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.