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.

相关推荐
bukeyiwanshui2 小时前
20260417 DNS实验
linux
代码中介商2 小时前
Linux 帮助手册与用户管理完全指南
linux·运维·服务器
weixin_449173654 小时前
Linux -- 项目中查找日志的常用Linux命令
linux·运维·服务器
想唱rap5 小时前
C++智能指针
linux·jvm·数据结构·c++·mysql·ubuntu·bash
Strugglingler5 小时前
基于whiptail开发shell导航工具
linux·shell·ui设计·whiptail
艾醒(AiXing-w)5 小时前
Linux系统管理(二十)——Linux root磁盘不足?一站式应急清理方案(亲测可用)
linux·运维·服务器
小义_6 小时前
【Kubernetes】(五) pod2
linux·云原生·容器·kubernetes
哇哦9827 小时前
渗透安全(渗透防御)②
linux·安全·渗透防御
chao_6666668 小时前
AI coding 代码开发规范
linux·运维·服务器
xiaobangsky8 小时前
Linux SMB/CIFS 网络挂载配置指南
linux·运维·网络