English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux useradd command is used to create user accounts.
The useradd command can be used to create user accounts. After the account is created, use passwd to set the account password. You can use userdel to delete the account. The accounts created using the useradd command are actually stored in /etc/It is in the passwd text file.
useradd [-mMnr][-c <remark>][-d <login directory>][-e <validity period>][-f <buffer days>][-g <group>][-G <group>][-s <shell>][-u <uid>][User Account]
or
useradd -D [-b][-e <validity period>][-f <buffer days>][-g <group>][-G <group>][-s <shell>]
Parameter Description:
Add a general user
# useradd tt
Specify the corresponding user group for the added user
# useradd -g root tt
Create a system user
# useradd -r tt
Specify the home directory for the newly added user
# useradd -d /home/myd tt
Create a user and specify the ID
# useradd caojh -u 544