I got a Ubuntu 15 VM and I am adding a second virtual disk for the home partition.
I moved the old home to home.old. and have mounted the new home on the new disk. and the mount is successful. But when I go see home, I don't see the directory for my test user. the directory for test is still under home.old.
I also tried to create a new test user, test2 but neither home nor home.old shows me the directory test2.
test2@test-virtual-machine:/$ cd /home
test2@test-virtual-machine:/home$ ls
lost+found
test2@test-virtual-machine:/home$ cd ..
test2@test-virtual-machine:/$ ls /home.old/
test
test2@test-virtual-machine:/$
What's going on here?
Thanks
EDIT: as per request
test@test-virtual-machine:/home$ cd ~
bash: cd: /home/test: No such file or directory
test@test-virtual-machine:/home$ pwd
/home
test@test-virtual-machine:/home$ ls
aquota.user lost+found
test@test-virtual-machine:/home$
Try the following:
Make sure the files listed (except for
..
) all have your user name. For example:It's a bit confusing, but to add a new user, don't use
useradd
.man useradd
says:Instead, first remove the user you created with
useradd
by usingdeluser
:Then, add a user with
adduser
:Follow the prompts, and you'll have a new user properly created.