sudo adduser vpandey
# Output
Adding user `vpandey' ...
Adding new group `vpandey' (1001) ...
Adding new user `vpandey' (1001) with group `lubos' ...
Creating home directory `/home/vpandey' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for lubos
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
usermod -aG sudo vpandey
# make sudoers file wriatble
chmod u+w /etc/sudoers
# Add below line
echo vpandey ALL=(ALL) NOPASSWD:ALL >> /etc/sudoers
# remove write access again
chmod u-w /etc/sudoers
# List Users
compgen -u
awk -F: '{ print $1}' /etc/passwd
# List Groups
compgen -g
awk -F: '{ print $1}' /etc/group
# Create group
sudo groupadd vikiscripts
# You could add the users to this new group
sudo usermod -a -G vikiscripts vpandey2
sudo usermod -a -G vikiscripts vpandey
# Verify
grep vikiscripts /etc/group

chown <user_name>:<grp_name> dir_name
