Setting users groups and permissions
=======================================
root@ora11gr2 ~]# groupadd jamil
[root@ora11gr2 ~]# groupadd ayaan
[root@ora11gr2 ~]# cat /etc/group
jamil:x:504:
ayaan:x:505:
[root@ora11gr2 ~]# useradd -g jamil -G ayaan saad
[root@ora11gr2 ~]# passwd saad
Changing password for user saad.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@ora11gr2 ~]# su - saad
[saad@ora11gr2 ~]$ exit
logout
[root@ora11gr2 ~]# cat /etc/passwd
saad:x:501:504::/home/saad:/bin/bash
[root@ora11gr2 ~]#
[root@ora11gr2 ~]# mkdir saad
[root@ora11gr2 ~]# chown -R saad:jamil saad/
[root@ora11gr2 ~]# chmod -R 775 saad/
[root@ora11gr2 ~]# ls -al saad/
total 12
drwxrwxr-x 2 saad jamil 4096 Oct 14 10:50 .
drwxr-x--- 16 root root 4096 Oct 14 10:50 ..
=======================================
root@ora11gr2 ~]# groupadd jamil
[root@ora11gr2 ~]# groupadd ayaan
[root@ora11gr2 ~]# cat /etc/group
jamil:x:504:
ayaan:x:505:
[root@ora11gr2 ~]# useradd -g jamil -G ayaan saad
[root@ora11gr2 ~]# passwd saad
Changing password for user saad.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@ora11gr2 ~]# su - saad
[saad@ora11gr2 ~]$ exit
logout
[root@ora11gr2 ~]# cat /etc/passwd
saad:x:501:504::/home/saad:/bin/bash
[root@ora11gr2 ~]#
[root@ora11gr2 ~]# mkdir saad
[root@ora11gr2 ~]# chown -R saad:jamil saad/
[root@ora11gr2 ~]# chmod -R 775 saad/
[root@ora11gr2 ~]# ls -al saad/
total 12
drwxrwxr-x 2 saad jamil 4096 Oct 14 10:50 .
drwxr-x--- 16 root root 4096 Oct 14 10:50 ..