GNU/Linux >> Linux の 問題 >  >> Ubuntu

Useraddの-dオプションと-mオプションの違いは何ですか?

useraddを使用する場合 、-dの違いは何ですか および-m ?どちらの定義も似ているように聞こえるので、ホームディレクトリの作成を担当します。

承認された回答:

2つのオプションは実際には似ていませんが、一緒に機能することができます。 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.

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

-d オプションは、作成されたユーザーのホームディレクトリを設定するだけですが、ホームディレクトリが存在しない場合は作成されません。 -m オプションは、-dによって設定されるホームディレクトリを作成します 存在しない場合。


Ubuntu
  1. Sudo Su –とSudo Su —の違いは何ですか?

  2. セミコロンとダブルアンパサンドの違いは何ですか&&?

  3. Linux –`su-`と`su–login`の違いは何ですか?

  1. NssとPamの違いは?

  2. AwkのPrintとPrintfの違いは何ですか?

  3. Python-minimalとPython-allの違いは何ですか?

  1. $(stuff)と `stuff`の違いは何ですか?

  2. [[$ a ==Z*]]と[$a==Z *]の違いは?

  3. LubuntuとLxdeの違いは?