SlideShare a Scribd company logo
Name Engr. Zardari Saddam Hussain
B.E Computer System Engineering QUEST Nawabshah
HIST ID 2374
Training System & Network Administration
Shift Evening(1:30 PM - 6:30 PM)
Institute Hidaya Institute of Science And Technology Jamshoro, Sindh
[zardarisaddam@hist~]$ whoami
Topic for discussion
All in LINUX
1 ) Users
i. Adding user
ii. Deletion of user
iii. User Modification
2 ) Groups
i. Adding Group (s)
ii. Deletion of Group(s)
iii. Addition of users in Existing Group
3) Errors During Creation of Users and Groups
Caution…..!
 In order to create new logins, modify or delete users & groups,
you must already be logged in as root.
Why Users are Created….?
Because…
 There are number of Persons in an Organization and everyone have to access
his own account
 For Security purposes.
Why groups are Created….?
Because…
 To setup same type of users in a single group/category so that we may easily
assign permissions to user ,in Group.
Users
User 1 User 2 User 3
Addition of User
Make sure that you are in ROOT……???
To add new users just use this command
[root]# useradd abulaqdeerkhan
User is added
Don’t try to write user name in upper case either you will face
error
User name and primary groups is stored in /etc/passwd.
Setting Password of user
To give a password to this user which we created before remember you
are in root ,just type
[root]# passwd abulaqdeerkhan
If abulaqdeerkhan wants to change his own password than he must be
logged in his account and just type
[abulaqdeerkhan] $ passwd
Enter existing password
Enter new password
Enter new password again (to validate)
Passwords for each user is stored in /etc/shadow.
This file should only be changed using the passwd command.
By default Home directory of every new user is created in /home
but if you want to create user’s home directory to any other
location than you can do that using this command.
[root]# useradd abulaqdeerkhan –d / abulaqdeerkhan
Now home directory of user abulaqdeerkhan by this name will be
in / (root) instead of /home.
Removing a User
Once user is created than it can be deleted, any time you want
to do this just type this command.
[root]# userdel abulaqdeerkhan
When a user is deleted by default its files remains in home, because
these files may contain important data.
But if you want to remove their home folder and all their files.
[root]# userdel -r abulaqdeerkhan
What do you mean By Modification…..??
To change the structure, character, intent, etc.
To make change in Existing Things
This is Modification……..!!!
Same concept of modification here in Linux
To Modify the Existing User
Particular Command is used to Modify the users
[root] # usermod
You can Use this command To..
Add an Expiry Date on Existing User
Change Login Name
Change Group
Lock user account
Unlock user account
Change Expiry date of Existing user
[root] # usermod -e 20120630 amarjaleel
User amarjaleel’s account will be Expired on 30 June 2012
Change Login Name
[root] # usermod -l jaleelsindhi ( New Name) amarjaleel (Old Name)
New login name is jaleelsindhi
Lock user account
[root] # usermod -L quaideazam
User quaideazam’s account is now locked
Unlock user account
[root] # usermod -U allamaiqbal
User allamaiqbal’s account is now unlocked
How To know about Locked and Unlocked Accounts
Go To
[root] # vim /etc/shadow
If exclamation mark ( ! ) in front of the password appeared means
particular account is Locked
When (!) mark vanished out means account is Unlocked
Note:
When account is locked user cannot login Graphically or
from command line
Groups
Addition of Group(s)
Here we are going to Add a New Group
So don’t forget to be in ROOT
[root]# groupadd eagles5
Here new group eagle5 is added
Lets Set group password
[root]# gpasswd eagles5
Go to..
/etc/gshadow to se the information of group password
Deletion of Group(s)
Here we are going to remove a n existing Group
[root]# groupdel eagles5
Here group eagle5 is deleted
Go to..
/etc/group to se the information of group
Adding user(s) to Group(s)
 adding users to existing group
[root]# usermod -G eagles5(group name) sheikhayaz(user
name)
Here sheikhayaz is added to group eagles5 .
Remember that when a new user is created his primary group by
its user name also created, now sheikhayaz has eagle5
(supplementary group) but now his primary groups is eagle5,
sheikhayaz (primary group) but here changed Now……
Go to..
/etc/group to se the information of group
Adding user(s) to Group(s)
 adding users to existing group
[root]# usermod -g eagles5(group name) riazudinsiddiqui(user name)
Here riazudinsiddiqui is added to group eagles5 and he will have only one
group that is eagles5
Now members of eagle5 group are free to access and modify all of its
contents without any restriction,its setting up its initial group
Go to..
/etc/group to se the information of group
Adding multiple users to a Group
 adding multiple users to existing group
[root]# gpasswd -M ali, saddam, qadir ,unis ,nbgabol eagle5(group name)
Here all five users are added to a single group eagles5
By using this command you may add many users as you can
Go to..
/etc/group to se the information of group
Errors During Creation of Users and Groups
 some times errors are arise during creation of users and groups, because
of these file which are automatically created in /etc
/etc/shadow.lock
/etc/gshadow.lock
/etc/passwd.lock
/etc/group.lock
You just have to remove these files from /etc than you will be able to
create users and accounts and their passwords
[root]# rm -rf /etc/shadow.lock
And all other
These files may be created due to giving incorrect password many times,
for security reasons LINUX locks such users and groups
[zardarisaddam@hist~]$ man summary
Root can create users and groups
There is a difference between adding a user and modifying a user
Whenever a new user is added its primary group is created by default
A file /etc/passwd contain the information such as User ID, group ID,
homedir etc. The format is like this.
user:x:UID:GID:comment:homedir:shell
e.g.
root:x:0:0:root:/bin/bash
So as you can see there is a lot of things stored in /etc/passwd
 A file /etc/group contains information regarding groups
 A file /etc/shadow contains passwords in encrypted form
 A file /etc/gshadow contains passwords of groups in encrypted form
if errors are arising during creation of groups and users are faced by
deleting files
/etc/shadow.lock
/etc/gshadow.lock
/etc/passwd.lock
/etc/group.lock
[zardarisaddam@hist~]$ kill -9 2374
Presentation1

More Related Content

Viewers also liked

Arpit Bhatnagar - Resume
Arpit Bhatnagar - ResumeArpit Bhatnagar - Resume
Arpit Bhatnagar - Resume
Arpit Bhatnagar
 
Nguy hiểm khôn lường của việc mất ngủ
Nguy hiểm khôn lường của việc mất ngủNguy hiểm khôn lường của việc mất ngủ
Nguy hiểm khôn lường của việc mất ngủspencer503
 
Bipin_e&p 2015
Bipin_e&p 2015Bipin_e&p 2015
Bipin_e&p 2015
Bipin Ghag
 
Mario Garza-ART CV 2015
Mario Garza-ART CV 2015Mario Garza-ART CV 2015
Mario Garza-ART CV 2015
Mario Garza
 
Id3 rivera valencialucia-prod-2
Id3 rivera valencialucia-prod-2Id3 rivera valencialucia-prod-2
Id3 rivera valencialucia-prod-2
Lucia_Rivera_Valencia
 
опорная школа 2015
опорная школа 2015опорная школа 2015
опорная школа 2015
Валерий Мусинов
 
Izm 1 stb-1876
Izm 1 stb-1876Izm 1 stb-1876
Izm 1 stb-1876
Raphael254
 
Better burger
Better burgerBetter burger
Better burger
cchs18
 
My vacations
My vacationsMy vacations
My vacations
maria867261
 
Stb 8023 2004
Stb 8023 2004Stb 8023 2004
Stb 8023 2004
Van Powers
 

Viewers also liked (12)

New Business courses
New Business coursesNew Business courses
New Business courses
 
Arpit Bhatnagar - Resume
Arpit Bhatnagar - ResumeArpit Bhatnagar - Resume
Arpit Bhatnagar - Resume
 
Nguy hiểm khôn lường của việc mất ngủ
Nguy hiểm khôn lường của việc mất ngủNguy hiểm khôn lường của việc mất ngủ
Nguy hiểm khôn lường của việc mất ngủ
 
Bipin_e&p 2015
Bipin_e&p 2015Bipin_e&p 2015
Bipin_e&p 2015
 
Mario Garza-ART CV 2015
Mario Garza-ART CV 2015Mario Garza-ART CV 2015
Mario Garza-ART CV 2015
 
paper
paperpaper
paper
 
Id3 rivera valencialucia-prod-2
Id3 rivera valencialucia-prod-2Id3 rivera valencialucia-prod-2
Id3 rivera valencialucia-prod-2
 
опорная школа 2015
опорная школа 2015опорная школа 2015
опорная школа 2015
 
Izm 1 stb-1876
Izm 1 stb-1876Izm 1 stb-1876
Izm 1 stb-1876
 
Better burger
Better burgerBetter burger
Better burger
 
My vacations
My vacationsMy vacations
My vacations
 
Stb 8023 2004
Stb 8023 2004Stb 8023 2004
Stb 8023 2004
 

Similar to Presentation1

ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)
Bipul Kumar
 
User management
User managementUser management
User management
Mufaddal Haidermota
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
Aisha Talat
 
Users and groups
Users and groupsUsers and groups
Users and groups
Varnnit Jain
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in Linux
Mohammed Yazdani
 
How to add user in system without useradd command
How to add user in system without useradd commandHow to add user in system without useradd command
How to add user in system without useradd command
Akshay Ithape
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
SAMUEL OJO
 
Unix Administration 3
Unix Administration 3Unix Administration 3
Unix Administration 3
Information Technology
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
Knoldus Inc.
 
sun solaris
sun solarissun solaris
G Mac Chapter04
G Mac Chapter04G Mac Chapter04
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissions
Shay Cohen
 
Chapter04 Implementing And Managing Group And Computer Accounts
Chapter04      Implementing And  Managing  Group And  Computer  AccountsChapter04      Implementing And  Managing  Group And  Computer  Accounts
Chapter04 Implementing And Managing Group And Computer Accounts
Raja Waseem Akhtar
 
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ HostbilloA Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
KiyanaSharma1
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Drush. Why should it be used?
Drush. Why should it be used?Drush. Why should it be used?
Drush. Why should it be used?
Sergei Stryukov
 
Basic Guide to make your Linux server ready
Basic Guide to make your Linux server readyBasic Guide to make your Linux server ready
Basic Guide to make your Linux server ready
Arslan Malik Aareez
 
70 640 Lesson05 Ppt 041009
70 640 Lesson05 Ppt 04100970 640 Lesson05 Ppt 041009
70 640 Lesson05 Ppt 041009
Coffeyville Community College
 
Linux lecture
Linux lectureLinux lecture
Linux lecture
Paktia University
 
MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014
Lars Thalmann
 

Similar to Presentation1 (20)

ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)
 
User management
User managementUser management
User management
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
 
Users and groups
Users and groupsUsers and groups
Users and groups
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in Linux
 
How to add user in system without useradd command
How to add user in system without useradd commandHow to add user in system without useradd command
How to add user in system without useradd command
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
 
Unix Administration 3
Unix Administration 3Unix Administration 3
Unix Administration 3
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
 
sun solaris
sun solarissun solaris
sun solaris
 
G Mac Chapter04
G Mac Chapter04G Mac Chapter04
G Mac Chapter04
 
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissions
 
Chapter04 Implementing And Managing Group And Computer Accounts
Chapter04      Implementing And  Managing  Group And  Computer  AccountsChapter04      Implementing And  Managing  Group And  Computer  Accounts
Chapter04 Implementing And Managing Group And Computer Accounts
 
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ HostbilloA Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Drush. Why should it be used?
Drush. Why should it be used?Drush. Why should it be used?
Drush. Why should it be used?
 
Basic Guide to make your Linux server ready
Basic Guide to make your Linux server readyBasic Guide to make your Linux server ready
Basic Guide to make your Linux server ready
 
70 640 Lesson05 Ppt 041009
70 640 Lesson05 Ppt 04100970 640 Lesson05 Ppt 041009
70 640 Lesson05 Ppt 041009
 
Linux lecture
Linux lectureLinux lecture
Linux lecture
 
MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014
 

Recently uploaded

6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 

Recently uploaded (20)

6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 

Presentation1

  • 1. Name Engr. Zardari Saddam Hussain B.E Computer System Engineering QUEST Nawabshah HIST ID 2374 Training System & Network Administration Shift Evening(1:30 PM - 6:30 PM) Institute Hidaya Institute of Science And Technology Jamshoro, Sindh [zardarisaddam@hist~]$ whoami
  • 2.
  • 3. Topic for discussion All in LINUX 1 ) Users i. Adding user ii. Deletion of user iii. User Modification 2 ) Groups i. Adding Group (s) ii. Deletion of Group(s) iii. Addition of users in Existing Group 3) Errors During Creation of Users and Groups
  • 4. Caution…..!  In order to create new logins, modify or delete users & groups, you must already be logged in as root.
  • 5. Why Users are Created….? Because…  There are number of Persons in an Organization and everyone have to access his own account  For Security purposes. Why groups are Created….? Because…  To setup same type of users in a single group/category so that we may easily assign permissions to user ,in Group.
  • 6. Users User 1 User 2 User 3
  • 7. Addition of User Make sure that you are in ROOT……??? To add new users just use this command [root]# useradd abulaqdeerkhan User is added Don’t try to write user name in upper case either you will face error User name and primary groups is stored in /etc/passwd.
  • 8. Setting Password of user To give a password to this user which we created before remember you are in root ,just type [root]# passwd abulaqdeerkhan If abulaqdeerkhan wants to change his own password than he must be logged in his account and just type [abulaqdeerkhan] $ passwd Enter existing password Enter new password Enter new password again (to validate) Passwords for each user is stored in /etc/shadow. This file should only be changed using the passwd command.
  • 9. By default Home directory of every new user is created in /home but if you want to create user’s home directory to any other location than you can do that using this command. [root]# useradd abulaqdeerkhan –d / abulaqdeerkhan Now home directory of user abulaqdeerkhan by this name will be in / (root) instead of /home.
  • 10. Removing a User Once user is created than it can be deleted, any time you want to do this just type this command. [root]# userdel abulaqdeerkhan When a user is deleted by default its files remains in home, because these files may contain important data. But if you want to remove their home folder and all their files. [root]# userdel -r abulaqdeerkhan
  • 11. What do you mean By Modification…..?? To change the structure, character, intent, etc. To make change in Existing Things
  • 13. Same concept of modification here in Linux To Modify the Existing User Particular Command is used to Modify the users [root] # usermod You can Use this command To.. Add an Expiry Date on Existing User Change Login Name Change Group Lock user account Unlock user account
  • 14. Change Expiry date of Existing user [root] # usermod -e 20120630 amarjaleel User amarjaleel’s account will be Expired on 30 June 2012 Change Login Name [root] # usermod -l jaleelsindhi ( New Name) amarjaleel (Old Name) New login name is jaleelsindhi Lock user account [root] # usermod -L quaideazam User quaideazam’s account is now locked
  • 15. Unlock user account [root] # usermod -U allamaiqbal User allamaiqbal’s account is now unlocked
  • 16. How To know about Locked and Unlocked Accounts Go To [root] # vim /etc/shadow If exclamation mark ( ! ) in front of the password appeared means particular account is Locked When (!) mark vanished out means account is Unlocked Note: When account is locked user cannot login Graphically or from command line
  • 18. Addition of Group(s) Here we are going to Add a New Group So don’t forget to be in ROOT [root]# groupadd eagles5 Here new group eagle5 is added Lets Set group password [root]# gpasswd eagles5 Go to.. /etc/gshadow to se the information of group password
  • 19. Deletion of Group(s) Here we are going to remove a n existing Group [root]# groupdel eagles5 Here group eagle5 is deleted Go to.. /etc/group to se the information of group
  • 20. Adding user(s) to Group(s)  adding users to existing group [root]# usermod -G eagles5(group name) sheikhayaz(user name) Here sheikhayaz is added to group eagles5 . Remember that when a new user is created his primary group by its user name also created, now sheikhayaz has eagle5 (supplementary group) but now his primary groups is eagle5, sheikhayaz (primary group) but here changed Now…… Go to.. /etc/group to se the information of group
  • 21. Adding user(s) to Group(s)  adding users to existing group [root]# usermod -g eagles5(group name) riazudinsiddiqui(user name) Here riazudinsiddiqui is added to group eagles5 and he will have only one group that is eagles5 Now members of eagle5 group are free to access and modify all of its contents without any restriction,its setting up its initial group Go to.. /etc/group to se the information of group
  • 22. Adding multiple users to a Group  adding multiple users to existing group [root]# gpasswd -M ali, saddam, qadir ,unis ,nbgabol eagle5(group name) Here all five users are added to a single group eagles5 By using this command you may add many users as you can Go to.. /etc/group to se the information of group
  • 23. Errors During Creation of Users and Groups  some times errors are arise during creation of users and groups, because of these file which are automatically created in /etc /etc/shadow.lock /etc/gshadow.lock /etc/passwd.lock /etc/group.lock You just have to remove these files from /etc than you will be able to create users and accounts and their passwords [root]# rm -rf /etc/shadow.lock And all other These files may be created due to giving incorrect password many times, for security reasons LINUX locks such users and groups
  • 24. [zardarisaddam@hist~]$ man summary Root can create users and groups There is a difference between adding a user and modifying a user Whenever a new user is added its primary group is created by default A file /etc/passwd contain the information such as User ID, group ID, homedir etc. The format is like this. user:x:UID:GID:comment:homedir:shell e.g. root:x:0:0:root:/bin/bash So as you can see there is a lot of things stored in /etc/passwd  A file /etc/group contains information regarding groups  A file /etc/shadow contains passwords in encrypted form  A file /etc/gshadow contains passwords of groups in encrypted form if errors are arising during creation of groups and users are faced by deleting files /etc/shadow.lock /etc/gshadow.lock /etc/passwd.lock /etc/group.lock