Merging two users?












1














Is there a way to merge two users, and combine all the documents? I have two users, and the permissions are getting screwy, as I guess sometimes I action items with different accounts somehow.










share|improve this question






















  • I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
    – Ray
    Dec 17 at 3:24
















1














Is there a way to merge two users, and combine all the documents? I have two users, and the permissions are getting screwy, as I guess sometimes I action items with different accounts somehow.










share|improve this question






















  • I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
    – Ray
    Dec 17 at 3:24














1












1








1







Is there a way to merge two users, and combine all the documents? I have two users, and the permissions are getting screwy, as I guess sometimes I action items with different accounts somehow.










share|improve this question













Is there a way to merge two users, and combine all the documents? I have two users, and the permissions are getting screwy, as I guess sometimes I action items with different accounts somehow.







permissions multiple-users






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 17 at 1:41









LexITSol

62




62












  • I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
    – Ray
    Dec 17 at 3:24


















  • I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
    – Ray
    Dec 17 at 3:24
















I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
– Ray
Dec 17 at 3:24




I guess there isn't an easy way to "merge accounts" because there's always the possibility of duplicate filenames. There's no reliable way to resolve such conflict, unless you are ok with using the date/time on the file (i.e., more recent file wins). You can use a file synchronization tool such as unison or the graphical front-end unison-gtk, but when a conflict occurs, it will prompt the user for a resolution. I believe both sit on top of rsync.
– Ray
Dec 17 at 3:24










2 Answers
2






active

oldest

votes


















1














Let's say you have userA and userB and we want to only have userA:



First, make sure userA owns everything:



sudo chown -R userA:userA /home/userB
sudo chown -R userA:userA /home/userA


Now userA owns everything in both home folders, you can move the files how you choose. If we use the file browser to go to /home/userB and select all the folders/files and cut (ctrl+x) then navigate to /home/userA and paste (ctrl+v).



Files will ask what to do with duplicates, select merge for the folders, and skip or replace the duplicates. If you want to keep config files too, you will need to hit ctrl+h to show hidden files and then copy/move those to userA home folder.



Once you are satisfied that all files are moved, you can delete userb:



sudo userdel userB
sudo rm -rf /home/userB


And that should be about it!






share|improve this answer





























    1














    This answer should solve the problem, assuming one or both of the users has sudo privileges source




    sudo cp /home/USER1/FNAME /home/USER2/FNAME && sudo chown USER2:USER2 /home/USER2/FNAME


    Will copy the file from USER1 to USER2, and then change the owner of
    the copy in /home/USER2 to USER2



    If you do not have sudo privileges, then the two users will need to
    ensure that you have read permissions on the USER1 directory, and
    write access on the USER2 directory. If you have these accesses, you
    can enter the command:



    cp /home/USER1/FNAME /home/USER2/FNAME


    This will copy the file in question, but USER2 may not be able to
    manipulate the file until they have appropriate permissions




    In your particular case, you would likely need to sudo cp -R /home/USER2/* rather than just copying file by file.



    Not flagging as a duplicate, as it's not technically the same question. If that doesn't matter, and it should be marked as a duplicate, someone with a higher rep score, please flag






    share|improve this answer























    • That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
      – LexITSol
      Dec 17 at 14:15






    • 1




      welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
      – Joshua Besneatte
      Dec 17 at 14:21










    • @JoshuaBesneatte Done. Thanks for the heads up.
      – SlidingHorn
      Dec 17 at 19:55











    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f1102449%2fmerging-two-users%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Let's say you have userA and userB and we want to only have userA:



    First, make sure userA owns everything:



    sudo chown -R userA:userA /home/userB
    sudo chown -R userA:userA /home/userA


    Now userA owns everything in both home folders, you can move the files how you choose. If we use the file browser to go to /home/userB and select all the folders/files and cut (ctrl+x) then navigate to /home/userA and paste (ctrl+v).



    Files will ask what to do with duplicates, select merge for the folders, and skip or replace the duplicates. If you want to keep config files too, you will need to hit ctrl+h to show hidden files and then copy/move those to userA home folder.



    Once you are satisfied that all files are moved, you can delete userb:



    sudo userdel userB
    sudo rm -rf /home/userB


    And that should be about it!






    share|improve this answer


























      1














      Let's say you have userA and userB and we want to only have userA:



      First, make sure userA owns everything:



      sudo chown -R userA:userA /home/userB
      sudo chown -R userA:userA /home/userA


      Now userA owns everything in both home folders, you can move the files how you choose. If we use the file browser to go to /home/userB and select all the folders/files and cut (ctrl+x) then navigate to /home/userA and paste (ctrl+v).



      Files will ask what to do with duplicates, select merge for the folders, and skip or replace the duplicates. If you want to keep config files too, you will need to hit ctrl+h to show hidden files and then copy/move those to userA home folder.



      Once you are satisfied that all files are moved, you can delete userb:



      sudo userdel userB
      sudo rm -rf /home/userB


      And that should be about it!






      share|improve this answer
























        1












        1








        1






        Let's say you have userA and userB and we want to only have userA:



        First, make sure userA owns everything:



        sudo chown -R userA:userA /home/userB
        sudo chown -R userA:userA /home/userA


        Now userA owns everything in both home folders, you can move the files how you choose. If we use the file browser to go to /home/userB and select all the folders/files and cut (ctrl+x) then navigate to /home/userA and paste (ctrl+v).



        Files will ask what to do with duplicates, select merge for the folders, and skip or replace the duplicates. If you want to keep config files too, you will need to hit ctrl+h to show hidden files and then copy/move those to userA home folder.



        Once you are satisfied that all files are moved, you can delete userb:



        sudo userdel userB
        sudo rm -rf /home/userB


        And that should be about it!






        share|improve this answer












        Let's say you have userA and userB and we want to only have userA:



        First, make sure userA owns everything:



        sudo chown -R userA:userA /home/userB
        sudo chown -R userA:userA /home/userA


        Now userA owns everything in both home folders, you can move the files how you choose. If we use the file browser to go to /home/userB and select all the folders/files and cut (ctrl+x) then navigate to /home/userA and paste (ctrl+v).



        Files will ask what to do with duplicates, select merge for the folders, and skip or replace the duplicates. If you want to keep config files too, you will need to hit ctrl+h to show hidden files and then copy/move those to userA home folder.



        Once you are satisfied that all files are moved, you can delete userb:



        sudo userdel userB
        sudo rm -rf /home/userB


        And that should be about it!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 17 at 14:14









        Joshua Besneatte

        2,0271923




        2,0271923

























            1














            This answer should solve the problem, assuming one or both of the users has sudo privileges source




            sudo cp /home/USER1/FNAME /home/USER2/FNAME && sudo chown USER2:USER2 /home/USER2/FNAME


            Will copy the file from USER1 to USER2, and then change the owner of
            the copy in /home/USER2 to USER2



            If you do not have sudo privileges, then the two users will need to
            ensure that you have read permissions on the USER1 directory, and
            write access on the USER2 directory. If you have these accesses, you
            can enter the command:



            cp /home/USER1/FNAME /home/USER2/FNAME


            This will copy the file in question, but USER2 may not be able to
            manipulate the file until they have appropriate permissions




            In your particular case, you would likely need to sudo cp -R /home/USER2/* rather than just copying file by file.



            Not flagging as a duplicate, as it's not technically the same question. If that doesn't matter, and it should be marked as a duplicate, someone with a higher rep score, please flag






            share|improve this answer























            • That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
              – LexITSol
              Dec 17 at 14:15






            • 1




              welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
              – Joshua Besneatte
              Dec 17 at 14:21










            • @JoshuaBesneatte Done. Thanks for the heads up.
              – SlidingHorn
              Dec 17 at 19:55
















            1














            This answer should solve the problem, assuming one or both of the users has sudo privileges source




            sudo cp /home/USER1/FNAME /home/USER2/FNAME && sudo chown USER2:USER2 /home/USER2/FNAME


            Will copy the file from USER1 to USER2, and then change the owner of
            the copy in /home/USER2 to USER2



            If you do not have sudo privileges, then the two users will need to
            ensure that you have read permissions on the USER1 directory, and
            write access on the USER2 directory. If you have these accesses, you
            can enter the command:



            cp /home/USER1/FNAME /home/USER2/FNAME


            This will copy the file in question, but USER2 may not be able to
            manipulate the file until they have appropriate permissions




            In your particular case, you would likely need to sudo cp -R /home/USER2/* rather than just copying file by file.



            Not flagging as a duplicate, as it's not technically the same question. If that doesn't matter, and it should be marked as a duplicate, someone with a higher rep score, please flag






            share|improve this answer























            • That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
              – LexITSol
              Dec 17 at 14:15






            • 1




              welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
              – Joshua Besneatte
              Dec 17 at 14:21










            • @JoshuaBesneatte Done. Thanks for the heads up.
              – SlidingHorn
              Dec 17 at 19:55














            1












            1








            1






            This answer should solve the problem, assuming one or both of the users has sudo privileges source




            sudo cp /home/USER1/FNAME /home/USER2/FNAME && sudo chown USER2:USER2 /home/USER2/FNAME


            Will copy the file from USER1 to USER2, and then change the owner of
            the copy in /home/USER2 to USER2



            If you do not have sudo privileges, then the two users will need to
            ensure that you have read permissions on the USER1 directory, and
            write access on the USER2 directory. If you have these accesses, you
            can enter the command:



            cp /home/USER1/FNAME /home/USER2/FNAME


            This will copy the file in question, but USER2 may not be able to
            manipulate the file until they have appropriate permissions




            In your particular case, you would likely need to sudo cp -R /home/USER2/* rather than just copying file by file.



            Not flagging as a duplicate, as it's not technically the same question. If that doesn't matter, and it should be marked as a duplicate, someone with a higher rep score, please flag






            share|improve this answer














            This answer should solve the problem, assuming one or both of the users has sudo privileges source




            sudo cp /home/USER1/FNAME /home/USER2/FNAME && sudo chown USER2:USER2 /home/USER2/FNAME


            Will copy the file from USER1 to USER2, and then change the owner of
            the copy in /home/USER2 to USER2



            If you do not have sudo privileges, then the two users will need to
            ensure that you have read permissions on the USER1 directory, and
            write access on the USER2 directory. If you have these accesses, you
            can enter the command:



            cp /home/USER1/FNAME /home/USER2/FNAME


            This will copy the file in question, but USER2 may not be able to
            manipulate the file until they have appropriate permissions




            In your particular case, you would likely need to sudo cp -R /home/USER2/* rather than just copying file by file.



            Not flagging as a duplicate, as it's not technically the same question. If that doesn't matter, and it should be marked as a duplicate, someone with a higher rep score, please flag







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 17 at 19:54

























            answered Dec 17 at 2:30









            SlidingHorn

            766




            766












            • That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
              – LexITSol
              Dec 17 at 14:15






            • 1




              welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
              – Joshua Besneatte
              Dec 17 at 14:21










            • @JoshuaBesneatte Done. Thanks for the heads up.
              – SlidingHorn
              Dec 17 at 19:55


















            • That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
              – LexITSol
              Dec 17 at 14:15






            • 1




              welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
              – Joshua Besneatte
              Dec 17 at 14:21










            • @JoshuaBesneatte Done. Thanks for the heads up.
              – SlidingHorn
              Dec 17 at 19:55
















            That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
            – LexITSol
            Dec 17 at 14:15




            That sounds pretty straightforward... I'll give it a shot when I get home. Thanks!
            – LexITSol
            Dec 17 at 14:15




            1




            1




            welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
            – Joshua Besneatte
            Dec 17 at 14:21




            welcome to askUbuntu! when answering questions, it is best to post an actual answer and not just a link (in case link goes down)... unless of course you are flagging a dupe... thanks!
            – Joshua Besneatte
            Dec 17 at 14:21












            @JoshuaBesneatte Done. Thanks for the heads up.
            – SlidingHorn
            Dec 17 at 19:55




            @JoshuaBesneatte Done. Thanks for the heads up.
            – SlidingHorn
            Dec 17 at 19:55


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102449%2fmerging-two-users%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b