I needed to change a server password, done that by passwd. Thing is, this Ubuntu Server installation uses the home encryption aparently. Once I changed the password, after some package update, the server doesn't show the files just after login in via SSH, as before. To access user home files, I have to ecryptfs-mount-private, then type in the older user password, then cd /home/<user>, and finally, to get all aliases and styling running source .bashrc.

I don't mind to do that, but today I tried to use psql command to interact with local PostgreSQL server, but the message keep showing:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory could not identify current directory: No such file or directory Password for user postgres: could not identify current directory: No such file or directory /usr/lib/postgresql/9.5/bin/psql: could not find own program executable

I can work with psql if I go to /usr/lib/postgresql/9.5/bin/, but I would like to retrieve the ease of just typing psql from anywhere and things work.

How do I change the encryptation password so it would be the same as the user then running automatically as I log in by SSH?


After some more research I found this answer here in AskUbuntu:

Will changing password re-encrypt my home directory?

What I had to do was:

ecryptfs-rewrap-passphrase ~/.ecryptfs/wrapped-passphrase
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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