You can use GUI tools or command line tools. I like to use command line tools for group admin. Use groupadd command to add (create) a new group definition on the system. Use groupmod command to modify a group definition on the system.
Adding new group
Use groupadd command to add group called pusers:
# groupadd pusers
Create a group called sshusers with GID 500:
# groupadd –g 500 sshusers
Add new user volini to group sshusers:
# useradd –d /nas/home/v/volini -m volini
Add existing user rose to group sshusers:
# usermod -G pusers rose
Rename group
Change the name sshusers to ftpusers:
# groupmod -n ftpusers sshusers
Delete the group
Remove the group called foxadmin
# groupdel foxadmin
If you manually modified the /etc/group file then you can check any group file inconsistencies with grpck command:
# vi /etc/group
# grpck
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 2 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
good reference indeed sir! thanks for saving me some time!
Very helpful. Good reference.