useradd (add accounts)
Creates new user account. Also used to change account information.
Format: useradd user
Examples: useradd janet2
Opt | What It Does | Examples |
---|---|---|
-g group | Set group owner to group | useradd -g janet2 janet2 |
-G groups | Add user to additional groups | useradd -G sales janet2 |
-D | Display defaults | useradd -D janet |
-M | Do not create a home directory | useradd -M specacct |
Get Spring Into Linux® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.