3

How can I change the UID of a user with an encrypted home directory?

1 Answer 1

3

You first need to logout the user you want to modify and kill all processes he runs.
A good approach is to restart and log in as root or as another sudo user.

To enable the root user execute the following commands.

$ sudo su
# passwd

Now you can log in using root and the password you provided. Once logged in as root execute

# usermod -u newUID myuser

to change myuser's uid and

# chown -R myuser /home/.ecryptfs/myuser

to change the owner of the encrypted files.
You should now be able to log out and log back in as myuser.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .