SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Chapter 13Chapter 13
Account ManagementAccount Management
Ref. Pge. 330
Account TypeAccount Type
●
User AccountUser Account
– Each user has an unique user nameEach user has an unique user name
– Identified by UIDIdentified by UID
– Must login to use systemMust login to use system
●
Group AccountGroup Account
– Consists of one or more usersConsists of one or more users
– Each group has an unique group nameEach group has an unique group name
– Identified by GIDIdentified by GID
Ref. Pge. 330
Group TypeGroup Type
●
Primary GroupPrimary Group
– Each user must join at least one groupEach user must join at least one group
– Inherited by process and new fileInherited by process and new file
●
Secondary Group(s)Secondary Group(s)
– More group(s) to joinMore group(s) to join
●
Private GroupPrivate Group
– Same name as user, only one memberSame name as user, only one member
●
Public GroupPublic Group
– Consists of many membersConsists of many members
ID AllocationID Allocation
●
00
– Root, the super user (privilege)Root, the super user (privilege)
●
1-4991-499
– System usersSystem users
●
500+500+
– Regular usersRegular users
●
6553465534
– nobody / nfsnobodynobody / nfsnobody
Ref. Pge. 332
TheThe /etc/passwd/etc/passwd
●
Contains user account informationContains user account information
– User nameUser name
– Password (encrypted, or x)Password (encrypted, or x)
– User IDUser ID
– Group IDGroup ID
– CommentsComments
– Home directoryHome directory
– Login shellLogin shell
Ref. Pge. 340
TheThe /etc/group/etc/group
●
Contains group account informationContains group account information
– Group nameGroup name
– Password (encrypted, or x)Password (encrypted, or x)
– Group IDGroup ID
– Members (other than primary group)Members (other than primary group)
Ref. Pge. 347
TheThe /etc/shadow/etc/shadow
●
Contains account aging informationContains account aging information
– User nameUser name
– Encrypted passwordEncrypted password
– Last day, since 19700101 of password changingLast day, since 19700101 of password changing
– Minimum days, password could not be changedMinimum days, password could not be changed
– Maximum days, password must be changedMaximum days, password must be changed
– Warning days, be warned before maximum daysWarning days, be warned before maximum days
– Inactive days, disabled after maximum daysInactive days, disabled after maximum days
– Expire day, since 19700101 of account closingExpire day, since 19700101 of account closing
Ref. Pge. 341
UsingUsing useradduseradd
●
useradd <new_user>useradd <new_user>
– Creates a new user accountCreates a new user account
– Common options:Common options:
●
­p password­p password : gives an encrypted password: gives an encrypted password
●
­u UID­u UID : specifies UID: specifies UID
●
­g GID­g GID : specifies GID: specifies GID
●
­G groups­G groups : joins other groups: joins other groups
●
­c comment­c comment : sets comments: sets comments
●
­k skel­k skel : specifies skeleton directory: specifies skeleton directory
●
­s shell­s shell : specifies login shell: specifies login shell
●
­e expire­e expire : specifies expire day: specifies expire day
●
­m­m : creates home directory: creates home directory Ref. Pge. 334
UsingUsing usermodusermod
●
usermod <user>usermod <user>
– Modifies an existing user accountModifies an existing user account
– Most of options are identical toMost of options are identical to useradduseradd
– Other options:Other options:
●
­l new_name­l new_name : changes user name: changes user name
●
­L­L : locks an account: locks an account
●
­U­U : unlocks an account: unlocks an account
UsingUsing userdeluserdel
●
userdel <user>userdel <user>
– Deletes an existing user accountDeletes an existing user account
– Common options:Common options:
●
­r­r : removes home directory: removes home directory
Ref. Pge. 344
UsingUsing groupaddgroupadd
●
groupadd <new_group>groupadd <new_group>
– Creates a new groupCreates a new group
– Common options:Common options:
●
­g GID­g GID : specifies GID: specifies GID
●
­o­o : allowed to use an existing GID: allowed to use an existing GID
●
­r­r : creates a system group: creates a system group
Ref. Pge. 345
UsingUsing groupmodgroupmod
●
groupmod <group_name>groupmod <group_name>
– Modifies an existing groupModifies an existing group
– Common options:Common options:
●
­g GID­g GID : changes GID: changes GID
●
­n new_name­n new_name : changes group name: changes group name
●
­o­o : allowed to use an existing GID: allowed to use an existing GID
●
­r­r : changes to a system group: changes to a system group
UsingUsing groupdelgroupdel
●
groupdel <group_name>groupdel <group_name>
– Deletes an existing groupDeletes an existing group
– Group must be empty (no member)Group must be empty (no member)
UsingUsing passwdpasswd
●
passwd <user>passwd <user>
– Changes password for an userChanges password for an user
– Only root can change password for othersOnly root can change password for others
– Common options:Common options:
●
­l­l : locks account: locks account
●
­u­u : unlocks account: unlocks account
Ref. Pge. 336
UsingUsing gpasswdgpasswd
●
gpasswd <group>gpasswd <group>
– sets or changes password for a groupsets or changes password for a group
●
gpasswd ­r <group>gpasswd ­r <group>
– removes password for a groupremoves password for a group
●
gpasswd ­a <user> <group>gpasswd ­a <user> <group>
– adds a group memberadds a group member
●
gpasswd ­A <user> <group>gpasswd ­A <user> <group>
– specifies a group administratorspecifies a group administrator
●
gpasswd ­d <user> <group>gpasswd ­d <user> <group>
– deletes a group memberdeletes a group member
Ref. Pge. 346
UsingUsing newgrpnewgrp
●
newgrp <group>newgrp <group>
– Temporally changes primary groupTemporally changes primary group
– Must be a member of target group, or providesMust be a member of target group, or provides
the group passwordthe group password
Ref. Pge. 332
UsingUsing chagechage
●
chage <user>chage <user>
– Changes aging information for a userChanges aging information for a user
– Common options:Common options:
●
­l­l : lists aging status: lists aging status
●
­d­d : changes last day: changes last day
●
­m­m : changes minimum day: changes minimum day
●
­M­M : changes maximum day: changes maximum day
●
­W­W : changes warning day: changes warning day
●
­I­I : changes inactive day: changes inactive day
●
­E­E : changes expire day: changes expire day
Ref. Pge. 339
UsingUsing chshchsh
●
chshchsh
– Allows a user to change the login shellAllows a user to change the login shell
– Common options:Common options:
●
­l­l : lists all available shells: lists all available shells
●
­s shell­s shell : specifies a new shell: specifies a new shell
UsingUsing fingerfinger
●
fingerfinger
– Displays information of the current loginDisplays information of the current login
●
finger <user>finger <user>
– Displays information of a specific userDisplays information of a specific user
UsingUsing idid
●
id <user|group>id <user|group>
– Displays all IDs of a user or groupDisplays all IDs of a user or group
– Common options:Common options:
●
­u­u : lists UID only: lists UID only
●
­g­g : lists GID only: lists GID only
●
­un­un : lists user name only: lists user name only
●
­gn­gn : lists group name only: lists group name only
UsingUsing groupsgroups
●
groupsgroups
– Displays all group names the current loginDisplays all group names the current login
belongs tobelongs to
●
groups <user>groups <user>
– Displays group names of a specific userDisplays group names of a specific user

Weitere ähnliche Inhalte

Andere mochten auch

Linux fundamental - Chap 10 fs
Linux fundamental - Chap 10 fsLinux fundamental - Chap 10 fs
Linux fundamental - Chap 10 fsKenny (netman)
 
Linux fundamental - Chap 08 proc
Linux fundamental - Chap 08 procLinux fundamental - Chap 08 proc
Linux fundamental - Chap 08 procKenny (netman)
 
The linux command line for total beginners
The linux command line  for total beginnersThe linux command line  for total beginners
The linux command line for total beginnersCorrie Watt
 
Linux fundamental - Chap 01 io
Linux fundamental - Chap 01 ioLinux fundamental - Chap 01 io
Linux fundamental - Chap 01 ioKenny (netman)
 
Linux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxLinux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxKenny (netman)
 
Linux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viLinux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viKenny (netman)
 
Ras pioverview
Ras pioverviewRas pioverview
Ras pioverviewAlec Clews
 
Linux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueLinux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueKenny (netman)
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08Tushar Jain
 
Linux pipe & redirection
Linux pipe & redirectionLinux pipe & redirection
Linux pipe & redirectionColin Su
 
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileKenny (netman)
 
Linux network monitoring hands-on pratice
Linux network monitoring hands-on praticeLinux network monitoring hands-on pratice
Linux network monitoring hands-on praticeKenny (netman)
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentalschakrikolla
 
Power point (asking permission)
Power point (asking permission)Power point (asking permission)
Power point (asking permission)ahmaddarda1505
 

Andere mochten auch (20)

Linux fundamental - Chap 10 fs
Linux fundamental - Chap 10 fsLinux fundamental - Chap 10 fs
Linux fundamental - Chap 10 fs
 
Linux fundamental - Chap 08 proc
Linux fundamental - Chap 08 procLinux fundamental - Chap 08 proc
Linux fundamental - Chap 08 proc
 
Linux CLI
Linux CLILinux CLI
Linux CLI
 
The linux command line for total beginners
The linux command line  for total beginnersThe linux command line  for total beginners
The linux command line for total beginners
 
Linux fundamental - Chap 01 io
Linux fundamental - Chap 01 ioLinux fundamental - Chap 01 io
Linux fundamental - Chap 01 io
 
Linux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxLinux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regx
 
Linux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viLinux fundamental - Chap 07 vi
Linux fundamental - Chap 07 vi
 
Ras pioverview
Ras pioverviewRas pioverview
Ras pioverview
 
Chap 18 net
Chap 18 netChap 18 net
Chap 18 net
 
Linux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueLinux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System Rescue
 
Chap 17 advfs
Chap 17 advfsChap 17 advfs
Chap 17 advfs
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux pipe & redirection
Linux pipe & redirectionLinux pipe & redirection
Linux pipe & redirection
 
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 file
 
Linux network monitoring hands-on pratice
Linux network monitoring hands-on praticeLinux network monitoring hands-on pratice
Linux network monitoring hands-on pratice
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
 
Your first linux programs
Your first linux programsYour first linux programs
Your first linux programs
 
Power point (asking permission)
Power point (asking permission)Power point (asking permission)
Power point (asking permission)
 

Ähnlich wie Linux fundamental - Chap 13 account management

Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in LinuxKnoldus Inc.
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in LinuxSAMUEL OJO
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administratorAisha Talat
 
Useradmin
Useradmin Useradmin
Useradmin ARYA TM
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in LinuxMohammed Yazdani
 
How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7VCP Muthukrishna
 

Ähnlich wie Linux fundamental - Chap 13 account management (9)

Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
 
7 - User Administration in Red Hat
7 - User Administration in Red Hat7 - User Administration in Red Hat
7 - User Administration in Red Hat
 
Useradmin
Useradmin Useradmin
Useradmin
 
Basic linux day 5
Basic linux day 5Basic linux day 5
Basic linux day 5
 
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 Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7How To Manage Linux User on RHEL 7
How To Manage Linux User on RHEL 7
 

Mehr von Kenny (netman)

rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration stepsKenny (netman)
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingKenny (netman)
 
Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptKenny (netman)
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementKenny (netman)
 
Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootKenny (netman)
 
Linux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archiveLinux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archiveKenny (netman)
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellKenny (netman)
 
Linux Network Monitoring
Linux Network MonitoringLinux Network Monitoring
Linux Network MonitoringKenny (netman)
 

Mehr von Kenny (netman) (16)

rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration steps
 
Rpi audio
Rpi audioRpi audio
Rpi audio
 
Ha opensuse
Ha opensuseHa opensuse
Ha opensuse
 
Chap 19 web
Chap 19 webChap 19 web
Chap 19 web
 
About the Course
About the CourseAbout the Course
About the Course
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job Scheduling
 
Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell script
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
 
Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 boot
 
Linux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archiveLinux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archive
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shell
 
Linux system security
Linux system securityLinux system security
Linux system security
 
Linux Network Monitoring
Linux Network MonitoringLinux Network Monitoring
Linux Network Monitoring
 
加密應用(GPG)
加密應用(GPG)加密應用(GPG)
加密應用(GPG)
 
金鑰管理 (PKI)
金鑰管理 (PKI)金鑰管理 (PKI)
金鑰管理 (PKI)
 
Linux firewall
Linux firewallLinux firewall
Linux firewall
 

Kürzlich hochgeladen

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Kürzlich hochgeladen (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Linux fundamental - Chap 13 account management

  • 1. Chapter 13Chapter 13 Account ManagementAccount Management Ref. Pge. 330
  • 2. Account TypeAccount Type ● User AccountUser Account – Each user has an unique user nameEach user has an unique user name – Identified by UIDIdentified by UID – Must login to use systemMust login to use system ● Group AccountGroup Account – Consists of one or more usersConsists of one or more users – Each group has an unique group nameEach group has an unique group name – Identified by GIDIdentified by GID Ref. Pge. 330
  • 3. Group TypeGroup Type ● Primary GroupPrimary Group – Each user must join at least one groupEach user must join at least one group – Inherited by process and new fileInherited by process and new file ● Secondary Group(s)Secondary Group(s) – More group(s) to joinMore group(s) to join ● Private GroupPrivate Group – Same name as user, only one memberSame name as user, only one member ● Public GroupPublic Group – Consists of many membersConsists of many members
  • 4. ID AllocationID Allocation ● 00 – Root, the super user (privilege)Root, the super user (privilege) ● 1-4991-499 – System usersSystem users ● 500+500+ – Regular usersRegular users ● 6553465534 – nobody / nfsnobodynobody / nfsnobody Ref. Pge. 332
  • 5. TheThe /etc/passwd/etc/passwd ● Contains user account informationContains user account information – User nameUser name – Password (encrypted, or x)Password (encrypted, or x) – User IDUser ID – Group IDGroup ID – CommentsComments – Home directoryHome directory – Login shellLogin shell Ref. Pge. 340
  • 6. TheThe /etc/group/etc/group ● Contains group account informationContains group account information – Group nameGroup name – Password (encrypted, or x)Password (encrypted, or x) – Group IDGroup ID – Members (other than primary group)Members (other than primary group) Ref. Pge. 347
  • 7. TheThe /etc/shadow/etc/shadow ● Contains account aging informationContains account aging information – User nameUser name – Encrypted passwordEncrypted password – Last day, since 19700101 of password changingLast day, since 19700101 of password changing – Minimum days, password could not be changedMinimum days, password could not be changed – Maximum days, password must be changedMaximum days, password must be changed – Warning days, be warned before maximum daysWarning days, be warned before maximum days – Inactive days, disabled after maximum daysInactive days, disabled after maximum days – Expire day, since 19700101 of account closingExpire day, since 19700101 of account closing Ref. Pge. 341
  • 8. UsingUsing useradduseradd ● useradd <new_user>useradd <new_user> – Creates a new user accountCreates a new user account – Common options:Common options: ● ­p password­p password : gives an encrypted password: gives an encrypted password ● ­u UID­u UID : specifies UID: specifies UID ● ­g GID­g GID : specifies GID: specifies GID ● ­G groups­G groups : joins other groups: joins other groups ● ­c comment­c comment : sets comments: sets comments ● ­k skel­k skel : specifies skeleton directory: specifies skeleton directory ● ­s shell­s shell : specifies login shell: specifies login shell ● ­e expire­e expire : specifies expire day: specifies expire day ● ­m­m : creates home directory: creates home directory Ref. Pge. 334
  • 9. UsingUsing usermodusermod ● usermod <user>usermod <user> – Modifies an existing user accountModifies an existing user account – Most of options are identical toMost of options are identical to useradduseradd – Other options:Other options: ● ­l new_name­l new_name : changes user name: changes user name ● ­L­L : locks an account: locks an account ● ­U­U : unlocks an account: unlocks an account
  • 10. UsingUsing userdeluserdel ● userdel <user>userdel <user> – Deletes an existing user accountDeletes an existing user account – Common options:Common options: ● ­r­r : removes home directory: removes home directory Ref. Pge. 344
  • 11. UsingUsing groupaddgroupadd ● groupadd <new_group>groupadd <new_group> – Creates a new groupCreates a new group – Common options:Common options: ● ­g GID­g GID : specifies GID: specifies GID ● ­o­o : allowed to use an existing GID: allowed to use an existing GID ● ­r­r : creates a system group: creates a system group Ref. Pge. 345
  • 12. UsingUsing groupmodgroupmod ● groupmod <group_name>groupmod <group_name> – Modifies an existing groupModifies an existing group – Common options:Common options: ● ­g GID­g GID : changes GID: changes GID ● ­n new_name­n new_name : changes group name: changes group name ● ­o­o : allowed to use an existing GID: allowed to use an existing GID ● ­r­r : changes to a system group: changes to a system group
  • 13. UsingUsing groupdelgroupdel ● groupdel <group_name>groupdel <group_name> – Deletes an existing groupDeletes an existing group – Group must be empty (no member)Group must be empty (no member)
  • 14. UsingUsing passwdpasswd ● passwd <user>passwd <user> – Changes password for an userChanges password for an user – Only root can change password for othersOnly root can change password for others – Common options:Common options: ● ­l­l : locks account: locks account ● ­u­u : unlocks account: unlocks account Ref. Pge. 336
  • 15. UsingUsing gpasswdgpasswd ● gpasswd <group>gpasswd <group> – sets or changes password for a groupsets or changes password for a group ● gpasswd ­r <group>gpasswd ­r <group> – removes password for a groupremoves password for a group ● gpasswd ­a <user> <group>gpasswd ­a <user> <group> – adds a group memberadds a group member ● gpasswd ­A <user> <group>gpasswd ­A <user> <group> – specifies a group administratorspecifies a group administrator ● gpasswd ­d <user> <group>gpasswd ­d <user> <group> – deletes a group memberdeletes a group member Ref. Pge. 346
  • 16. UsingUsing newgrpnewgrp ● newgrp <group>newgrp <group> – Temporally changes primary groupTemporally changes primary group – Must be a member of target group, or providesMust be a member of target group, or provides the group passwordthe group password Ref. Pge. 332
  • 17. UsingUsing chagechage ● chage <user>chage <user> – Changes aging information for a userChanges aging information for a user – Common options:Common options: ● ­l­l : lists aging status: lists aging status ● ­d­d : changes last day: changes last day ● ­m­m : changes minimum day: changes minimum day ● ­M­M : changes maximum day: changes maximum day ● ­W­W : changes warning day: changes warning day ● ­I­I : changes inactive day: changes inactive day ● ­E­E : changes expire day: changes expire day Ref. Pge. 339
  • 18. UsingUsing chshchsh ● chshchsh – Allows a user to change the login shellAllows a user to change the login shell – Common options:Common options: ● ­l­l : lists all available shells: lists all available shells ● ­s shell­s shell : specifies a new shell: specifies a new shell
  • 19. UsingUsing fingerfinger ● fingerfinger – Displays information of the current loginDisplays information of the current login ● finger <user>finger <user> – Displays information of a specific userDisplays information of a specific user
  • 20. UsingUsing idid ● id <user|group>id <user|group> – Displays all IDs of a user or groupDisplays all IDs of a user or group – Common options:Common options: ● ­u­u : lists UID only: lists UID only ● ­g­g : lists GID only: lists GID only ● ­un­un : lists user name only: lists user name only ● ­gn­gn : lists group name only: lists group name only
  • 21. UsingUsing groupsgroups ● groupsgroups – Displays all group names the current loginDisplays all group names the current login belongs tobelongs to ● groups <user>groups <user> – Displays group names of a specific userDisplays group names of a specific user