ecryptfs-migrate-home fails on subsequent runs, if first run fails due to wrong login password

Bug #1072865 reported by Daniel Holbert
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eCryptfs
New
Undecided
Unassigned

Bug Description

STEPS TO REPRODUCE:
 1. Create a temporary user without an encrypted home directory:
        sudo useradd -m testUser -p testPassword

 2. Run ecryptfs-migrate-home for that user
        sudo ecryptfs-migrate-home -u testUser

 3. ecryptfs-migrate-home will immediately prompt you for the user's password. Pretend you've forgotten it. Just hit "enter", or mistype the password.

 4. Now you've remembered the password! Repeat step 2.

ACTUAL RESULTS: ecryptfs-migrate-home fails, saying:
> If you already have some data in directory /home/.ecryptfs/testUser,
> please move all of these files and directories out of the way, and
> follow the instructions in:
> ecryptfs-setup-private --undo
>
> ERROR: /home/.ecryptfs/testUser is not empty, cannot continue.

EXPECTED RESULTS: ecryptfs-migrate-home should work -- no cruft should've been left behind by the first run. It should have prompted me for the user's password (and verified that it's correct) *before* setting up state that's going to break subsequent runs.

summary: ecryptfs-migrate-home fails on subsequent runs, if first run fails due
- to wrong password
+ to wrong login password
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.