how to move home in ubuntu

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












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$






share|improve this question

















  • 1




    Run 'cd ~; pwd; ls' and tell me the results please
    – Grammargeek
    Jun 17 '15 at 2:49










  • hi, the results are posted to the question
    – D.Zou
    Jun 17 '15 at 3:18










  • Hmm weird but I meant as test2
    – Grammargeek
    Jun 17 '15 at 3:23










  • still the same result: bash: cd: /home/test2: No such file or directory
    – D.Zou
    Jun 17 '15 at 3:28











  • What happens if you run 'mkdir /home/test'?
    – Grammargeek
    Jun 17 '15 at 3:30
















up vote
1
down vote

favorite












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$






share|improve this question

















  • 1




    Run 'cd ~; pwd; ls' and tell me the results please
    – Grammargeek
    Jun 17 '15 at 2:49










  • hi, the results are posted to the question
    – D.Zou
    Jun 17 '15 at 3:18










  • Hmm weird but I meant as test2
    – Grammargeek
    Jun 17 '15 at 3:23










  • still the same result: bash: cd: /home/test2: No such file or directory
    – D.Zou
    Jun 17 '15 at 3:28











  • What happens if you run 'mkdir /home/test'?
    – Grammargeek
    Jun 17 '15 at 3:30












up vote
1
down vote

favorite









up vote
1
down vote

favorite











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$






share|improve this question













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$








share|improve this question












share|improve this question




share|improve this question








edited Jun 17 '15 at 3:17
























asked Jun 17 '15 at 2:40









D.Zou

7532815




7532815







  • 1




    Run 'cd ~; pwd; ls' and tell me the results please
    – Grammargeek
    Jun 17 '15 at 2:49










  • hi, the results are posted to the question
    – D.Zou
    Jun 17 '15 at 3:18










  • Hmm weird but I meant as test2
    – Grammargeek
    Jun 17 '15 at 3:23










  • still the same result: bash: cd: /home/test2: No such file or directory
    – D.Zou
    Jun 17 '15 at 3:28











  • What happens if you run 'mkdir /home/test'?
    – Grammargeek
    Jun 17 '15 at 3:30












  • 1




    Run 'cd ~; pwd; ls' and tell me the results please
    – Grammargeek
    Jun 17 '15 at 2:49










  • hi, the results are posted to the question
    – D.Zou
    Jun 17 '15 at 3:18










  • Hmm weird but I meant as test2
    – Grammargeek
    Jun 17 '15 at 3:23










  • still the same result: bash: cd: /home/test2: No such file or directory
    – D.Zou
    Jun 17 '15 at 3:28











  • What happens if you run 'mkdir /home/test'?
    – Grammargeek
    Jun 17 '15 at 3:30







1




1




Run 'cd ~; pwd; ls' and tell me the results please
– Grammargeek
Jun 17 '15 at 2:49




Run 'cd ~; pwd; ls' and tell me the results please
– Grammargeek
Jun 17 '15 at 2:49












hi, the results are posted to the question
– D.Zou
Jun 17 '15 at 3:18




hi, the results are posted to the question
– D.Zou
Jun 17 '15 at 3:18












Hmm weird but I meant as test2
– Grammargeek
Jun 17 '15 at 3:23




Hmm weird but I meant as test2
– Grammargeek
Jun 17 '15 at 3:23












still the same result: bash: cd: /home/test2: No such file or directory
– D.Zou
Jun 17 '15 at 3:28





still the same result: bash: cd: /home/test2: No such file or directory
– D.Zou
Jun 17 '15 at 3:28













What happens if you run 'mkdir /home/test'?
– Grammargeek
Jun 17 '15 at 3:30




What happens if you run 'mkdir /home/test'?
– Grammargeek
Jun 17 '15 at 3:30










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Try the following:



sudo cp -pR /home.old/test /home
cd
ll


Make sure the files listed (except for ..) all have your user name. For example:



drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/



It's a bit confusing, but to add a new user, don't use useradd. man useradd says:




useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.




Instead, first remove the user you created with useradd by using deluser:



sudo deluser --remove-home test2


Then, add a user with adduser:



sudo adduser test2


Follow the prompts, and you'll have a new user properly created.






share|improve this answer























  • it works, but how come the new user's directory aren't created or placed under the new home?
    – D.Zou
    Jun 17 '15 at 3:33










  • How did you add the user?
    – Olathe
    Jun 17 '15 at 3:35










  • useradd then set password
    – D.Zou
    Jun 17 '15 at 3:38










  • OK, I've added a section about that.
    – Olathe
    Jun 17 '15 at 3:42










  • @Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
    – Olathe
    Jun 17 '15 at 3:54











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f637405%2fhow-to-move-home-in-ubuntu%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










Try the following:



sudo cp -pR /home.old/test /home
cd
ll


Make sure the files listed (except for ..) all have your user name. For example:



drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/



It's a bit confusing, but to add a new user, don't use useradd. man useradd says:




useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.




Instead, first remove the user you created with useradd by using deluser:



sudo deluser --remove-home test2


Then, add a user with adduser:



sudo adduser test2


Follow the prompts, and you'll have a new user properly created.






share|improve this answer























  • it works, but how come the new user's directory aren't created or placed under the new home?
    – D.Zou
    Jun 17 '15 at 3:33










  • How did you add the user?
    – Olathe
    Jun 17 '15 at 3:35










  • useradd then set password
    – D.Zou
    Jun 17 '15 at 3:38










  • OK, I've added a section about that.
    – Olathe
    Jun 17 '15 at 3:42










  • @Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
    – Olathe
    Jun 17 '15 at 3:54















up vote
0
down vote



accepted










Try the following:



sudo cp -pR /home.old/test /home
cd
ll


Make sure the files listed (except for ..) all have your user name. For example:



drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/



It's a bit confusing, but to add a new user, don't use useradd. man useradd says:




useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.




Instead, first remove the user you created with useradd by using deluser:



sudo deluser --remove-home test2


Then, add a user with adduser:



sudo adduser test2


Follow the prompts, and you'll have a new user properly created.






share|improve this answer























  • it works, but how come the new user's directory aren't created or placed under the new home?
    – D.Zou
    Jun 17 '15 at 3:33










  • How did you add the user?
    – Olathe
    Jun 17 '15 at 3:35










  • useradd then set password
    – D.Zou
    Jun 17 '15 at 3:38










  • OK, I've added a section about that.
    – Olathe
    Jun 17 '15 at 3:42










  • @Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
    – Olathe
    Jun 17 '15 at 3:54













up vote
0
down vote



accepted







up vote
0
down vote



accepted






Try the following:



sudo cp -pR /home.old/test /home
cd
ll


Make sure the files listed (except for ..) all have your user name. For example:



drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/



It's a bit confusing, but to add a new user, don't use useradd. man useradd says:




useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.




Instead, first remove the user you created with useradd by using deluser:



sudo deluser --remove-home test2


Then, add a user with adduser:



sudo adduser test2


Follow the prompts, and you'll have a new user properly created.






share|improve this answer















Try the following:



sudo cp -pR /home.old/test /home
cd
ll


Make sure the files listed (except for ..) all have your user name. For example:



drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/



It's a bit confusing, but to add a new user, don't use useradd. man useradd says:




useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.




Instead, first remove the user you created with useradd by using deluser:



sudo deluser --remove-home test2


Then, add a user with adduser:



sudo adduser test2


Follow the prompts, and you'll have a new user properly created.







share|improve this answer















share|improve this answer



share|improve this answer








edited Jun 17 '15 at 3:42


























answered Jun 17 '15 at 3:28









Olathe

2,13811221




2,13811221











  • it works, but how come the new user's directory aren't created or placed under the new home?
    – D.Zou
    Jun 17 '15 at 3:33










  • How did you add the user?
    – Olathe
    Jun 17 '15 at 3:35










  • useradd then set password
    – D.Zou
    Jun 17 '15 at 3:38










  • OK, I've added a section about that.
    – Olathe
    Jun 17 '15 at 3:42










  • @Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
    – Olathe
    Jun 17 '15 at 3:54

















  • it works, but how come the new user's directory aren't created or placed under the new home?
    – D.Zou
    Jun 17 '15 at 3:33










  • How did you add the user?
    – Olathe
    Jun 17 '15 at 3:35










  • useradd then set password
    – D.Zou
    Jun 17 '15 at 3:38










  • OK, I've added a section about that.
    – Olathe
    Jun 17 '15 at 3:42










  • @Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
    – Olathe
    Jun 17 '15 at 3:54
















it works, but how come the new user's directory aren't created or placed under the new home?
– D.Zou
Jun 17 '15 at 3:33




it works, but how come the new user's directory aren't created or placed under the new home?
– D.Zou
Jun 17 '15 at 3:33












How did you add the user?
– Olathe
Jun 17 '15 at 3:35




How did you add the user?
– Olathe
Jun 17 '15 at 3:35












useradd then set password
– D.Zou
Jun 17 '15 at 3:38




useradd then set password
– D.Zou
Jun 17 '15 at 3:38












OK, I've added a section about that.
– Olathe
Jun 17 '15 at 3:42




OK, I've added a section about that.
– Olathe
Jun 17 '15 at 3:42












@Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
– Olathe
Jun 17 '15 at 3:54





@Grammargeek, .. in that directory listing is /home, which is owned by root. However, . in that directory listing is /home/test, which should be owned by test.
– Olathe
Jun 17 '15 at 3:54













 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f637405%2fhow-to-move-home-in-ubuntu%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error