I recently installed a fresh copy of Ubuntu 16.04.0 LTS on my server PC. I mounted my earlier /home directory to it. It consisted of multiple user accounts that were previously made.
But after installation, none of that account showed on the login screen. Now, I recreated those account using same earlier information (i.e. Name, Username .etc), but now whenever they try to login from the login screen, they are unable to do so while when they use ssh for login, the following message is shown:
Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.
1 Answer
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
0