The tutorial is about the user relation with group in linux. Many users can be listed in single group in linux.
Groups allow to set permissions on the group level instead
of having to grant permissions for every individual user
It specifies database structure with lots of ease
There are many useful commands for user and group management
in linux which helps to maintain groups very easily
groups
This command lists all the group names from which the user belongsFor example- root@kali:~# groups
root
groupadd
This command is used to create groups,
so that user can be listed in that groupFor example- root@kali:~# groupadd sandy
- It will create group name sandy in /etc/group file
groupmod
It is used to change the particular group definition in the system database
For example,to change the name of any group- root@kali:~# groupmod -n linux sandy
- -n is to change name
Hence group sandy is changed to linux
groupdel
This command is used to permanently delete the particular groupFor example- root@kali:~# groupdel sandy
- It will delete the group named sandy from the system database
useradd
This command is used to add user to any particular group.For example- root@kali:/etc# useradd -g linux user1
- It will add user named user1 to the group linux
usermod
It is used to modify the user account within the system database.
It modifies the system account files to show the
changes that are specified on the command line.
For example- usermod -a -G sandy,linux user1
- user1 will be member of groups sandy and linux>
- -a is used to add the user to the supplementary group(s).
- -G represents list of supplementary groups which the user is also a member of.
If the user is currently a member of a group which is not listed in the command,
then the user will be removed from that group.
gpasswd
It is used to give control of group membership to another user with the gpasswd command.
It is used to set administrators to group,
who can control the membership of different usersFor example- root@kali:~# gpasswd -A sandeep sandy
- It will make sandeep the administrator of group sandy
- root@kali:~# su - sandeep
- It will make sandeep the super user
- $ id user1
- uid=1005(user1) gid=1004(sandy) groups=1004(sandy)
- $ gpasswd -a google sandy
- Adding user google to group sandy
- $ id google
- uid=1007(google) gid=1004(sandy) groups=1004(sandy)
- $ tail -1 /etc/group
- sandy:x:1004:google,sandeep
- Information about group administrators is kept in the /etc/gshadow file.
newgrp
It helps to start a child shell with new primary group.
Thus it helps to change the current group with another named groupFor example- root@kali:~# mkdir sandy
- root@kali:~# cd sandy/
- root@kali:~/sandy# touch operators.txt
- root@kali:~/sandy# ls -lh
total 0
-rw-r--r-- 1 root root 0 Jun 12 16:50 operators.txt
- echo $SHLVL
1
"It shows that we are in parent shell"
- root@kali:/etc# newgrp sandeep
- root@kali:/etc# echo $SHLVL
2
"It shows that we are in child shell"
- root@kali:~/sandy# ls -lh
total 0
-rw-r--r-- 1 root sandeep 0 Jun 12 17:08 operators2.txt
-rw-r--r-- 1 root root 0 Jun 12 16:50 operators.txt
- root@kali:~/sandy# exit
exit
"exiting from child shell"
groups
This command lists all the group names from which the user belongs- For example
- root@kali:~# groups
root
groupadd
This command is used to create groups,so that user can be listed in that group
- For example
- root@kali:~# groupadd sandy
- It will create group name sandy in /etc/group file
groupmod
It is used to change the particular group definition in the system database- For example,to change the name of any group
- root@kali:~# groupmod -n linux sandy
- -n is to change name
Hence group sandy is changed to linux
groupdel
This command is used to permanently delete the particular group- For example
- root@kali:~# groupdel sandy
- It will delete the group named sandy from the system database
useradd
This command is used to add user to any particular group.- For example
- root@kali:/etc# useradd -g linux user1
- It will add user named user1 to the group linux
usermod
It is used to modify the user account within the system database.It modifies the system account files to show the
changes that are specified on the command line.
- For example
- usermod -a -G sandy,linux user1
- user1 will be member of groups sandy and linux>
- -a is used to add the user to the supplementary group(s).
- -G represents list of supplementary groups which the user is also a member of.
If the user is currently a member of a group which is not listed in the command,
then the user will be removed from that group.
gpasswd
It is used to give control of group membership to another user with the gpasswd command.It is used to set administrators to group,
who can control the membership of different users
- For example
- root@kali:~# gpasswd -A sandeep sandy
- It will make sandeep the administrator of group sandy
- root@kali:~# su - sandeep
- It will make sandeep the super user
- $ id user1
- uid=1005(user1) gid=1004(sandy) groups=1004(sandy)
- $ gpasswd -a google sandy
- Adding user google to group sandy
- $ id google
- uid=1007(google) gid=1004(sandy) groups=1004(sandy)
- $ tail -1 /etc/group
- sandy:x:1004:google,sandeep
- Information about group administrators is kept in the /etc/gshadow file.
newgrp
It helps to start a child shell with new primary group.Thus it helps to change the current group with another named group
- For example
- root@kali:~# mkdir sandy
- root@kali:~# cd sandy/
- root@kali:~/sandy# touch operators.txt
- root@kali:~/sandy# ls -lh
total 0
-rw-r--r-- 1 root root 0 Jun 12 16:50 operators.txt - echo $SHLVL
1
"It shows that we are in parent shell" - root@kali:/etc# newgrp sandeep
- root@kali:/etc# echo $SHLVL
2
"It shows that we are in child shell" - root@kali:~/sandy# ls -lh
total 0
-rw-r--r-- 1 root sandeep 0 Jun 12 17:08 operators2.txt
-rw-r--r-- 1 root root 0 Jun 12 16:50 operators.txt
- root@kali:~/sandy# exit
exit
"exiting from child shell"
Selling USA FRESH SSN Leads/Fullz, along with Driving License/ID Number with good connectivity.
ReplyDelete**Price for One SSN lead 2$**
All SSN's are Tested & Verified. Fresh spammed data.
**DETAILS IN LEADS/FULLZ**
->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER
->ADDRESS WITH ZIP
->PHONE NUMBER, EMAIL
->EMPLOYEE DETAILS
->Bulk order negotiable
->Hope for the long term business
->You can asked for specific states too
**Contact 24/7**
Whatsapp > +923172721122
Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040
ReplyDeleteAre you interested in the service of a hacker to get into a phone, facebook account, snapchat, Instagram, yahoo, Whatsapp, get verified on any social network account, increase your followers by any amount, bank wire and bank transfer. Contact him on hackintechnology@gmail.com +12132951376(WHATSAPP)
Do you need to increase your credit score?
ReplyDeleteDo you intend to upgrade your school grade?
Do you want to hack your cheating spouse Email, whatsapp, Facebook, instagram or any social network?
Do you need any information concerning any database.
Do you need to retrieve deleted files?
Do you need to clear your criminal records or DMV?
Do you want to remove any site or link from any blog?
you should contact this hacker, he is reliable and good at the hack jobs..
contact : cybergoldenhacker at gmail dot com
Selling USA FRESH SSN Leads/Fullz, along with Driving License/ID Number with good connectivity.
ReplyDelete**PRICE 2$ FOR EACH LEAD/FULLZ**
All Leads are Tested & Verified.
Fresh spammed data of USA Credit Bureau
Good credit Scores, 700 minimum scores.
**DETAILS IN EACH LEADS/FULLZ**
->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER WITH EXPIRY DATE
->ADDRESS WITH ZIP
->PHONE NUMBER, EMAIL, I.P ADDRESS
->EMPLOYEE DETAILS
->REALTIONSHIP DETAILS
->MORTGAGE INFO
->BANK ACCOUNT DETAILS
->Bulk order will be negotiable
->Minimum buy 25 to 30 leads/fullz
->Hope for the long term business
->You can asked for specific states/zips too
->Serous buyer will be warmly welcome
**Contact 24/7**
Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040