Use previous users already present in Linux Home directory

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








up vote
1
down vote

favorite












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:



Error message after login using ssh



Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.










share|improve this question



























    up vote
    1
    down vote

    favorite












    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:



    Error message after login using ssh



    Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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:



      Error message after login using ssh



      Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.










      share|improve this question















      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:



      Error message after login using ssh



      Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.







      ssh login users






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 10 at 16:13









      stumblebee

      2,3083922




      2,3083922










      asked Apr 10 at 15:39









      Muhammad Mubeen

      82




      82




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          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'.






          share|improve this answer




















            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%2f1023699%2fuse-previous-users-already-present-in-linux-home-directory%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
            2
            down vote



            accepted










            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'.






            share|improve this answer
























              up vote
              2
              down vote



              accepted










              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'.






              share|improve this answer






















                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                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'.






                share|improve this 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'.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 10 at 16:03









                Martin W

                74238




                74238



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023699%2fuse-previous-users-already-present-in-linux-home-directory%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

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

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

                    How do I move numbers in filenames, in a batch renaming operation?