The problem I have is that I use eCryptfs to encrypt a user's home folder, but in order to decrypt it the user must have a password. However, after I encrypt the home folder, I would love to change the user's password, especially make it a user having no password. In this circumstance, I am not able to log in via that user's account because of the password difference. What I would like to do is to change the user's password with no problem or be able to encrypt his folder even if the user has no password.
You can't have an encrypted home for a user without a password as this defeats the entire purpose of encryption.
However, you can change the password for the user when the home is already encrypted. The thing is, you can't do this from another user account with root privileges.
The files are encrypted with a key that is stored on the hard drive. This key is then encrypted with the user's password. Even if you have root access, you will still need to use the old password.
The solution is to have the user change the password without any elevated privileges.