Linux useradd命令

0 Preface/Foreword

1 useradd介绍

该命令是系统管理命令(System management command)。

useradd- create a new user or update default new user information

1.1 描述

++useradd++ is a low level utility for adding users. On Debian, administrators should usually use adduserinstead.

When invoked without the**-D** option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line options, the useradd command will update system files and may also create the new user's home directory (主目录,根目录) and copy intial files.

1.2 --comment

-c, --comment COMMENT

Any text string. It is generally a short description of the login , and is currently used as the field for the ++user's full name++.

1.3 --create-home

-m, --create-home

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

1.4 --shell

-s, --shell SHELL

The name of theuser's login shell . The default is to leave the field blank , which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by defaut.

相关推荐
mzhan01714 分钟前
Linux: rcu: 加速宽限期
linux·rcu
Fanfanaas43 分钟前
Linux 基础开发工具(二)
linux·运维·服务器·c语言
雾岛听蓝1 小时前
Linux线程基础
linux·开发语言·经验分享
齐落山大勇1 小时前
Linux的文件IO
linux·运维·服务器
tod1131 小时前
深入解析ext2文件系统架构
linux·服务器·c++·文件系统·ext
萧行之1 小时前
FRP 0.62.0 + Mac Ollama 公网穿透部署+排障实录(标准 TOML 格式)
linux·服务器
齐潇宇1 小时前
文件共享服务器
linux·运维·网络·文件共享
顺顺 尼2 小时前
进程(从操作系统的状态到linux的进程状态一步到位)
linux·服务器
x-cmd2 小时前
[260412] x-cmd v0.8.13:x free 新增进程内存显示,feishu、telegram REPL 机器人齐上线!
linux·macos·机器人·内存·x-cmd·telegram·feishu