我正在尝试使用以下命令在ubuntu中添加用户,但是未创建主目录。
undefined
但是默认情况下似乎没有添加主目录。我应该添加些什么才能默认为用户创建主目录
答案 0 :(得分:1)
它在useradd(8)
的手册页中:
-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.