General discussion

  • Creator
    Topic
  • #2188902

    cannot create home dir:

    Locked

    by zawmin20052003 ·

    Hi…now i’ve one pro:,I can’t create user home directory when i add new user.i can issue command “useradd -d” but nothing was create in referred directory.and i’ve tried to issued “usermod -d” again.but same .and i used root id to create new user.
    anybody knows it….? thanks alot.

All Comments

  • Author
    Replies
    • #3046595

      Reply To: cannot create home dir:

      by jaqui ·

      In reply to cannot create home dir:

      well, if the utils aren’t creating the dir, there is an error in thier config.
      the simplest workaround:
      md ~username
      cp bashrc ~username
      cp bash_profile ~username

      cp from a user with same permission levels the new user is to have.

      after that chown dir to ~username
      then chown the files to that user also.

    • #3115759

      Reply To: cannot create home dir:

      by martin simons ·

      In reply to cannot create home dir:

      use “useradd -d

      -m”
      or “usermod -d
      -m”

      the “-m” option will tell useradd/usermod to
      create the directory if it does not exist.
      Otherwise the -d only adds/modifies the directory
      reference in the user entry.

      I am sorry, I don’t mean to sound like an
      a**hole, but this information is found in the
      man pages “man useradd”.

Viewing 1 reply thread