Can't create user home in /mnt












0















I want to create a user home in /mnt with useradd but it didn't create it.



useradd user -d /mnt/home/user -s /bin/shell


Any suggestions?










share|improve this question

























  • Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

    – Santy Alvarez
    Jan 8 at 14:41











  • Thanks! It works! @steeldriver

    – Santy Alvarez
    Jan 8 at 14:43
















0















I want to create a user home in /mnt with useradd but it didn't create it.



useradd user -d /mnt/home/user -s /bin/shell


Any suggestions?










share|improve this question

























  • Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

    – Santy Alvarez
    Jan 8 at 14:41











  • Thanks! It works! @steeldriver

    – Santy Alvarez
    Jan 8 at 14:43














0












0








0








I want to create a user home in /mnt with useradd but it didn't create it.



useradd user -d /mnt/home/user -s /bin/shell


Any suggestions?










share|improve this question
















I want to create a user home in /mnt with useradd but it didn't create it.



useradd user -d /mnt/home/user -s /bin/shell


Any suggestions?







users home-directory






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 8 at 14:52









RoVo

6,9781741




6,9781741










asked Jan 8 at 14:38









Santy AlvarezSanty Alvarez

356




356













  • Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

    – Santy Alvarez
    Jan 8 at 14:41











  • Thanks! It works! @steeldriver

    – Santy Alvarez
    Jan 8 at 14:43



















  • Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

    – Santy Alvarez
    Jan 8 at 14:41











  • Thanks! It works! @steeldriver

    – Santy Alvarez
    Jan 8 at 14:43

















Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

– Santy Alvarez
Jan 8 at 14:41





Yeah, I'm root and I'm using sudo too, and it didn't works @Terrance

– Santy Alvarez
Jan 8 at 14:41













Thanks! It works! @steeldriver

– Santy Alvarez
Jan 8 at 14:43





Thanks! It works! @steeldriver

– Santy Alvarez
Jan 8 at 14:43










1 Answer
1






active

oldest

votes


















2














From man useradd:



       -d, --home-dir HOME_DIR
The new user will be created using HOME_DIR as the value for the
user's login directory. The default is to append the LOGIN name to
BASE_DIR and use that as the login directory name. The directory
HOME_DIR does not have to exist but will not be created if it is
missing.



You can either create the directory manually, or add the -m (--create-directory) option:



       -m, --create-home
Create the user's home directory if it does not exist. The files
and directories contained in the skeleton directory (which can be
defined with the -k option) will be copied to the home directory.

By default, if this option is not specified and CREATE_HOME is not
enabled, no home directories are created.





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',
    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%2f1108012%2fcant-create-user-home-in-mnt%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    From man useradd:



           -d, --home-dir HOME_DIR
    The new user will be created using HOME_DIR as the value for the
    user's login directory. The default is to append the LOGIN name to
    BASE_DIR and use that as the login directory name. The directory
    HOME_DIR does not have to exist but will not be created if it is
    missing.



    You can either create the directory manually, or add the -m (--create-directory) option:



           -m, --create-home
    Create the user's home directory if it does not exist. The files
    and directories contained in the skeleton directory (which can be
    defined with the -k option) will be copied to the home directory.

    By default, if this option is not specified and CREATE_HOME is not
    enabled, no home directories are created.





    share|improve this answer




























      2














      From man useradd:



             -d, --home-dir HOME_DIR
      The new user will be created using HOME_DIR as the value for the
      user's login directory. The default is to append the LOGIN name to
      BASE_DIR and use that as the login directory name. The directory
      HOME_DIR does not have to exist but will not be created if it is
      missing.



      You can either create the directory manually, or add the -m (--create-directory) option:



             -m, --create-home
      Create the user's home directory if it does not exist. The files
      and directories contained in the skeleton directory (which can be
      defined with the -k option) will be copied to the home directory.

      By default, if this option is not specified and CREATE_HOME is not
      enabled, no home directories are created.





      share|improve this answer


























        2












        2








        2







        From man useradd:



               -d, --home-dir HOME_DIR
        The new user will be created using HOME_DIR as the value for the
        user's login directory. The default is to append the LOGIN name to
        BASE_DIR and use that as the login directory name. The directory
        HOME_DIR does not have to exist but will not be created if it is
        missing.



        You can either create the directory manually, or add the -m (--create-directory) option:



               -m, --create-home
        Create the user's home directory if it does not exist. The files
        and directories contained in the skeleton directory (which can be
        defined with the -k option) will be copied to the home directory.

        By default, if this option is not specified and CREATE_HOME is not
        enabled, no home directories are created.





        share|improve this answer













        From man useradd:



               -d, --home-dir HOME_DIR
        The new user will be created using HOME_DIR as the value for the
        user's login directory. The default is to append the LOGIN name to
        BASE_DIR and use that as the login directory name. The directory
        HOME_DIR does not have to exist but will not be created if it is
        missing.



        You can either create the directory manually, or add the -m (--create-directory) option:



               -m, --create-home
        Create the user's home directory if it does not exist. The files
        and directories contained in the skeleton directory (which can be
        defined with the -k option) will be copied to the home directory.

        By default, if this option is not specified and CREATE_HOME is not
        enabled, no home directories are created.






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 8 at 14:54









        steeldriversteeldriver

        66.2k11106179




        66.2k11106179






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108012%2fcant-create-user-home-in-mnt%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

            How to make a Squid Proxy server?

            第一次世界大戦

            Touch on Surface Book