先创建用户
useradd username
将user的用户指定为group
The group name or number of the user´s new initial login group. The group must exist.
usermod -g group username
查看用户的用户组信息:
Print user and group information for the specified USER, or (when USER omitted) for the current user.
id username
Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed).
groups [username]
Linux修改密码用
passwd
命令,用root用户运行
passwd
,
passwd user_name
可以设置或修改任何用户的密码,普通用户运行
passwd
只能修改它自己的密码。
passwd username
版权声明:本文为danns888原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。