unix, adding users to existing directory in centos

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











up vote
-4
down vote

favorite












I'm trying to add users to an existing directory but I keep getting:




useradd: warning: the home directory already exists. Not copying any file from skel directory into it.




I want to add users to the /home/test directory; I know this isn't a good thing to do and there are many reasons why I shouldn't do it, but I need to do it anyway.



I want to add the user alex to the existing directory and ralf, so I tried to change the permission of the folders so users can access it:



chmod -R 777 /home/test


And add the user to the folder:



useradd -m -d /home/test ralf


But when I try to switch to the new user it shows this:





I think it is a permission issue but I am not too sure.







share|improve this question





















  • What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
    – dr01
    May 29 at 7:33














up vote
-4
down vote

favorite












I'm trying to add users to an existing directory but I keep getting:




useradd: warning: the home directory already exists. Not copying any file from skel directory into it.




I want to add users to the /home/test directory; I know this isn't a good thing to do and there are many reasons why I shouldn't do it, but I need to do it anyway.



I want to add the user alex to the existing directory and ralf, so I tried to change the permission of the folders so users can access it:



chmod -R 777 /home/test


And add the user to the folder:



useradd -m -d /home/test ralf


But when I try to switch to the new user it shows this:





I think it is a permission issue but I am not too sure.







share|improve this question





















  • What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
    – dr01
    May 29 at 7:33












up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











I'm trying to add users to an existing directory but I keep getting:




useradd: warning: the home directory already exists. Not copying any file from skel directory into it.




I want to add users to the /home/test directory; I know this isn't a good thing to do and there are many reasons why I shouldn't do it, but I need to do it anyway.



I want to add the user alex to the existing directory and ralf, so I tried to change the permission of the folders so users can access it:



chmod -R 777 /home/test


And add the user to the folder:



useradd -m -d /home/test ralf


But when I try to switch to the new user it shows this:





I think it is a permission issue but I am not too sure.







share|improve this question













I'm trying to add users to an existing directory but I keep getting:




useradd: warning: the home directory already exists. Not copying any file from skel directory into it.




I want to add users to the /home/test directory; I know this isn't a good thing to do and there are many reasons why I shouldn't do it, but I need to do it anyway.



I want to add the user alex to the existing directory and ralf, so I tried to change the permission of the folders so users can access it:



chmod -R 777 /home/test


And add the user to the folder:



useradd -m -d /home/test ralf


But when I try to switch to the new user it shows this:





I think it is a permission issue but I am not too sure.









share|improve this question












share|improve this question




share|improve this question








edited Jun 9 at 7:12









Michael Mrozek♦

58k25183205




58k25183205









asked May 28 at 13:39









squishy_ralf

1




1











  • What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
    – dr01
    May 29 at 7:33
















  • What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
    – dr01
    May 29 at 7:33















What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
– dr01
May 29 at 7:33




What is the reason beyond this? Which result do you want to accomplish? It looks like you're trying to break the system, which is never a wise thing to do (unless for testing).
– dr01
May 29 at 7:33










1 Answer
1






active

oldest

votes

















up vote
-2
down vote













From useradd(8):



-M, --no-create-home

Do no create the user's home directory, even if the system wide setting
from /etc/login.defs (CREATE_HOME) is set to yes.





share|improve this answer























    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f446484%2funix-adding-users-to-existing-directory-in-centos%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













    From useradd(8):



    -M, --no-create-home

    Do no create the user's home directory, even if the system wide setting
    from /etc/login.defs (CREATE_HOME) is set to yes.





    share|improve this answer



























      up vote
      -2
      down vote













      From useradd(8):



      -M, --no-create-home

      Do no create the user's home directory, even if the system wide setting
      from /etc/login.defs (CREATE_HOME) is set to yes.





      share|improve this answer

























        up vote
        -2
        down vote










        up vote
        -2
        down vote









        From useradd(8):



        -M, --no-create-home

        Do no create the user's home directory, even if the system wide setting
        from /etc/login.defs (CREATE_HOME) is set to yes.





        share|improve this answer















        From useradd(8):



        -M, --no-create-home

        Do no create the user's home directory, even if the system wide setting
        from /etc/login.defs (CREATE_HOME) is set to yes.






        share|improve this answer















        share|improve this answer



        share|improve this answer








        edited Jun 7 at 12:16


























        answered Jun 7 at 8:42









        mcepl

        972




        972






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446484%2funix-adding-users-to-existing-directory-in-centos%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay