Linux manage Groups, Users
How to manage Groups, User in linux
List All groups in linux
cat /etc/group
List all users in group
groups <group-name>
Show a group of user
id -Gn <user-name>
Add new group
addgroup <group-name>
Delete group
groupdel <group-name>
Show all user in linux
cat /etc/passwd
Add new user
adduser <user-name> // create folder for user
useradd <user-name> // don't create folder for user
Delete user
deluser <user-name>
userdel <user-name>
Set password for user
passwd <user-name>
Add user to group
adduser <user-name> <group-name>
Delete user in group
deluser <user-name> <group-name>
Thanks
Post a Comment