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.

相关推荐
殷色玫瑰31 分钟前
C++ string类详解:常用接口、字符串操作与模拟实现
java·linux·c语言·开发语言·数据结构·c++
忆挽篱笙歌1 小时前
gcc,g++
linux
l1t2 小时前
修复WSL CreateInstance/E_UNEXPECTED和 mounted read-only 错误
linux·windows·wsl
Ruiery2 小时前
Linux 6.6内核 CPU 深度解析(九):时钟与 TSC — 内核怎么从 PIT/HPET 切到 TSC
linux·运维·服务器
91刘仁德2 小时前
Linux网络编程从入门到实战:UDP/TCP协议与socket编程全解析
linux·网络·笔记·tcp/ip·udp
水饺编程3 小时前
第1章:下载 Linux 0.12 内核
linux·c语言·汇编·ubuntu
牢姐与蒯3 小时前
一点小碎片——每个线程独有的东西——上下文+栈
linux·运维·服务器
小此方3 小时前
Linux网络(二十):TCP拥塞控制与延迟应答详解:从拥塞窗口到TCP性能优化,理解TCP与UDP的效率差异
linux·网络·php
yunwei373 小时前
eBPF 开发实践:使用 eBPF 隐藏进程或文件信息
linux·后端·性能优化
芝麻开门2923 小时前
Linux文件系统
linux·文件系统