In: Computer Science
To creat goup VB with GID 5001, use command.
sudo addgroup --gid 5001 VB
To creat goup Norfolk with GID 5002, use command.
sudo addgroup --gid 5002 Norfolk
To add users to group VB, use command
useradd is a command in Linux that is used to add user accounts to your system. It is just a symbolic link to adduser command in Linux
sudo user add -G VB abc
sudo user add -G VB abcd
sudo user add -G VB abcde
To add password to created users, use command:
passwd command is used to change the password of system users
sudo passwd abc
This changes password for abc
sudo passwd abcd
This changes password for abcd
sudo passwd abcde
This changes password for abcde
To add users to group Norfolk, use command:
sudo useradd -G Norfolk sam
sudo useradd -G Norfolk sammy
sudo useradd -G Norfolk sunny
To add password to users, use command:
sudo passwd sam
sudo passwd sammy
sudo passwd sunny
To view the password hashes of created command, use command:
sudo vi /etc/shadow
To view UID and GID or users, use command:
sudo vi /etc/passwd
If you have any doubts, leave a comment below before rating. I'll be happy to assist you further
Do UPVOTE this as I have put a lot of EFFORT in answering this question. It really helps me.