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.

相关推荐
sanzk7 小时前
firefly开发板ubuntu安装ros2下的micro-ROS Agent
linux·运维·ubuntu
weixin_307779139 小时前
Linux下Nginx故障系统化检查Shell脚本
linux·运维·服务器·nginx·自动化
skyutuzz10 小时前
node安装部署
linux
一次旅行11 小时前
【AI工具】Rust-Based CLI:用 xargs 和并行加速你的 Linux 日常
linux·开发语言·rust
2501_9259633813 小时前
Hi3516CV610 + MPU6050 DMP 软件 EIS 防抖笔记
linux·运维·服务器
qetfw13 小时前
CentOS 7 基础环境配置
linux·运维·centos
天空'之城13 小时前
Linux 系统编程 21:守护进程与日志系统全解
linux·系统编程·日志系统·守护进程
l1t14 小时前
用split命令恢复被wget -c命令误追加的zip压缩包
linux
辉灰笔记15 小时前
MySQL8 意外关机/误移data目录导致服务启动失败 PID报错/权限报错 修复文档
linux·数据库·mysql·centos
ylscode17 小时前
CVE-2026-31694 漏洞深度分析:Linux 内核 FUSE 组件存在本地提权风险,普通用户可直取 root 权限
linux·运维·服务器