Hack 71. Create a new group and assign to an user
by Ramesh
Create a new developer group.
- # groupadd developers
Validate that the group was created successfully.
- # grep developer /etc/group
- developers:x:511:
Add an user to an existing group.
useradd -G developers jsmithuseradd: user jsmith exists # usermod -g developers jsmith
Validate the users group was modified successfully.
- # grep jsmith /etc/passwd
- jsmith:x:510:511:Oracle Developer:/home/jsmith:/bin/bash
- # id jsmith
- uid=510(jsmith) gid=511(developers) groups=511(developers)
- # grep jsmith /etc/group
- jsmith:x:510:
- developers:x:511:jsmith
当前内容版权归 Ramesh Natarajan 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Ramesh Natarajan .