sudo apt-get install ecryptfs-utils

Go to Recovery Mode

 

ubuntu# mount --options remount,rw /
ubuntu# mount --all

 

 
ubuntu# ecryptfs-migrate-home --user yogiyo
 
INFO: Checking disk sapce, this may take a few moments. Please be patient.
INFO : Checking for open files in /home/yogiyo
Enter your login passphrase [yogiyo] : _

 

Some Important Notes!
1. The file encryption appears to have completed successfully. however, yogiyo MUST LOGIN IMMEDIATELY, _BEFORE_THE_NEXT_REBOOT_, YO COMPLETE THE MIGRATION!!!
2. If yogiyo can log in and read and write their files, then the migration is complete, and you should remove /home/yogiyo.knSmoySm. Otherwise, restore /home/yogiyo.knSmoySm back to /home/yogiyo.
3. yogiyo should also run 'ecryptfs-unwrap-passphrase' and record their randomly generated mount passphrase as soon as possible.
4. To ensuure the integrity of all encrypted data on this system. you should also encrypt swap space with 'eccryptfs-setup-swap.'
 
ubuntu# reboot now

 

➜  ~  ls -al /home
total 20
drwxr-xr-x  5 root   root   4096  1월 12 13:18 .
drwxr-xr-x 22 root   root   4096  9월 25 18:01 ..
drwxr-xr-x  3 root   root   4096  1월 12 13:18 .ecryptfs
drwx------ 17 yogiyo yogiyo 4096  1월 12 13:29 yogiyo
drwx------ 17 yogiyo yogiyo 4096  1월 12 13:06 yogiyo.UQamUqRN

 

➜  ~ sudo rm -R /home/zaphod.ChPzzxqD
➜  ~ sudo ecryptfs-setup-swap

 

 ➜ / > whereis postgresql
postgresql: /etc/postgresql /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql
➜ / > cd /usr/lib/postgresql
➜  postgresql  ls
9.2  9.3

 

➜  postgresql  /etc/init.d/postgresql stop
 * Stopping PostgreSQL 9.2 database server                                                                                                                                                              [ OK ]
 * Stopping PostgreSQL 9.3 database server

 

 var/lib/postgresql


➜  ~ > cd /var/lib
➜  lib


➜  lib > mv postgresql /home/yogiyo/Yogiyo/Yogiyo_DB/
➜  lib > ln -s /home/yogiyo/Yogiyo/Yogiyo_DB/postgresql postgresql

➜  lib > ll
lrwxrwxrwx 1 root    root      40  1월 19 16:38 postgresql -> /home/yogiyo/Yogiyo/Yogiyo_DB/postgresql

 

➜  lib  sudo /etc/init.d/postgresql start➜  lib  sudo /etc/init.d/postgresql start
 * Starting PostgreSQL 9.2 database server                                                                                                                                                            [ OK ]
 * Starting PostgreSQL 9.3 database server 

 

 When you restart the vm, you should restart postgresql daemon!

 

'OS > Linux' 카테고리의 다른 글

CentOS에서 Chrome 설치하는 법  (0) 2016.06.08
putty connection refused  (0) 2016.04.21
PostInstallationEncryption  (0) 2016.03.30
Install Oh-My-Zsh on Ubuntu  (0) 2014.09.24
Ubuntu 기본 명령어  (0) 2014.09.03
CentOS 버전 확인  (0) 2013.04.25

+ Recent posts