shell基础十二篇_学习笔记_2_useradd_groupadd_passwd
useradd与groupadd命令
useradd添加用户,常用的选项有
-m 添加/home/xxx目录
-m, –create-home create home directory for the new user
account
-g 用户组的gid 指定用户所属的gid。
-g, –gid GROUP force use GROUP for the new user account
-G 附加组
-G, –groups GROUPS list of supplementary groups for the new
user account
例如abc用户属于abc的组,也属于root的组,abc组的gid为111
useradd -m -g 111 abc -G root abc
-s 指定用户的登录Shell
-s, –shell SHELL the login shell for the new user account
-p 密码