SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Presented By: Dipayan Pramanik
Users and groups in Linux
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Join the session 5 minutes prior to
the session start time. We start on
time and conclude on time!
Feedback
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Silent Mode
Keep your mobile devices in silent
mode, feel free to move out of
session in case you need to attend
an urgent call.
Avoid Disturbance
Avoid unwanted chit chat during
the session.
Agenda
01 Users: Creating, Deleting
02 Modifying user details and expiry
03 Groups: Creating, Deleting
04 System wide environment
05 sudo command and Managing user and group permission using sudoers file
Users
● A user is an entity, in a Linux operating system, that can manipulate
files and perform several other operations. Each user is assigned an
ID that is unique for each user in the operating system. (/etc/passwd
directory)
● Creating and deleting user :- useradd and userdel
● Creating users with default and custom home directory (/etc/skel
directory)
● System User accounts :- Accounts with UID less than 1000 and used
by daemons
● Set UID and GID for users
● Setting password and logging in to a user
Modifying user details and Expiry
● Change home directory of an user
● Change username and shell of an user
● Change defaults of useradd command
● chage command -
○ Set the max number of days after password change when
password expires
○ Setup warning for user to change password
○ Lock inactive accounts
○ Set Account expiry date
○ Set minimum number of days after which password can be
changed
Groups
● User groups play an important role on Linux systems. They provide
an easy way for a select groups of users to share files with each
other. They also allow sysadmins to more effectively manage user
privileges, since they can assign privileges to groups rather than
individual users. (/etc/group directory)
● Creating and deleting group :- groupadd, groupdel
● Add and remove user to and from a group
● Primary and Secondary groups:
○ Primary group – Specifies a group that the operating system
assigns to files that are created by the user. Each user must
belong to a primary group.
○ Secondary groups – Specifies one or more groups to which a user
also belongs. Users can belong to up to 15 secondary groups.
Groups
● Changing primary and secondary group of users.
● Creating users with specific primary and secondary groups
● Changing group name
● Deleting users from groups with new gained knowledge of primary
and secondary groups
System Wide environment
● Setting environment variables specific to an user
● Setting environment variables for all users (/etc/environment file)
● Using /etc/profile.d to create not so simple scripts that needs to be
executed every time any user opens a login shell to set any variable
or any profile
● Setting user specific profile using .bash_profile, .bash_login, .profile
sudo command and sudoers file
● sudo: Command to execute command as any other user (sudo -i and
sudo -u <command>)
● Editing /etc/sudoers file using visudo command
● sudoers file syntax:
○ User/group
○ Host based on which rules will be executed
○ Users and groups which can be used to execute the commands
○ Commands that can be executed
● Only root user can run sbin binaries
Cheatsheet
Command Description
useradd Command to create an user
usermod Command to modify user details
userdel Command to delete user
groupadd Command to create a group
groupdel Command to delete a group
gpasswd Command to add and remove user to and from a group
sudo Execute command as another user
su Switch user
chage Manage user account and password lifecycle
visudo Command to edit sudoers file(/etc/sudoers)
/etc/skel Directory from which new home directory is copied
/etc/environment System wide environment file
/etc/passwd File holds user details
/etc/profile.d Directory holds script that are execute on every user login
/etc/sudoers Sudoers file
Thank You !
Get in touch with us:
Lorem Studio, Lord Building
D4456, LA, USA

Mais conteúdo relacionado

Mais procurados

Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 

Mais procurados (20)

Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and Permissions
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
 
Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basic
 
Linux: Basics OF Linux
Linux: Basics OF LinuxLinux: Basics OF Linux
Linux: Basics OF Linux
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissions
 

Semelhante a Users and groups in Linux

ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)
Bipul Kumar
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
APSU
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
APSU
 
Users and groups in xp
Users and groups in xpUsers and groups in xp
Users and groups in xp
Rauf Wani
 

Semelhante a Users and groups in Linux (20)

Unix Administration 3
Unix Administration 3Unix Administration 3
Unix Administration 3
 
ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)ManagingLocalLinuxUsersandGroups(2)
ManagingLocalLinuxUsersandGroups(2)
 
Linux lecture
Linux lectureLinux lecture
Linux lecture
 
7 - User Administration in Red Hat
7 - User Administration in Red Hat7 - User Administration in Red Hat
7 - User Administration in Red Hat
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in Linux
 
Linux training in chandigarh.pptx Join Now
Linux training in chandigarh.pptx Join NowLinux training in chandigarh.pptx Join Now
Linux training in chandigarh.pptx Join Now
 
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
 
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
 
Ch11
Ch11Ch11
Ch11
 
Linux
Linux Linux
Linux
 
4.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v34.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v3
 
101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
 
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
 
Linux Security
Linux SecurityLinux Security
Linux Security
 
Users and groups in xp
Users and groups in xpUsers and groups in xp
Users and groups in xp
 
CS50x Permissions, Files, Users
CS50x Permissions, Files, UsersCS50x Permissions, Files, Users
CS50x Permissions, Files, Users
 
introduction to linux operating system basic information
introduction to linux operating system basic informationintroduction to linux operating system basic information
introduction to linux operating system basic information
 

Mais de Knoldus Inc.

Mais de Knoldus Inc. (20)

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Users and groups in Linux

  • 1. Presented By: Dipayan Pramanik Users and groups in Linux
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time! Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call. Avoid Disturbance Avoid unwanted chit chat during the session.
  • 3. Agenda 01 Users: Creating, Deleting 02 Modifying user details and expiry 03 Groups: Creating, Deleting 04 System wide environment 05 sudo command and Managing user and group permission using sudoers file
  • 4. Users ● A user is an entity, in a Linux operating system, that can manipulate files and perform several other operations. Each user is assigned an ID that is unique for each user in the operating system. (/etc/passwd directory) ● Creating and deleting user :- useradd and userdel ● Creating users with default and custom home directory (/etc/skel directory) ● System User accounts :- Accounts with UID less than 1000 and used by daemons ● Set UID and GID for users ● Setting password and logging in to a user
  • 5. Modifying user details and Expiry ● Change home directory of an user ● Change username and shell of an user ● Change defaults of useradd command ● chage command - ○ Set the max number of days after password change when password expires ○ Setup warning for user to change password ○ Lock inactive accounts ○ Set Account expiry date ○ Set minimum number of days after which password can be changed
  • 6. Groups ● User groups play an important role on Linux systems. They provide an easy way for a select groups of users to share files with each other. They also allow sysadmins to more effectively manage user privileges, since they can assign privileges to groups rather than individual users. (/etc/group directory) ● Creating and deleting group :- groupadd, groupdel ● Add and remove user to and from a group ● Primary and Secondary groups: ○ Primary group – Specifies a group that the operating system assigns to files that are created by the user. Each user must belong to a primary group. ○ Secondary groups – Specifies one or more groups to which a user also belongs. Users can belong to up to 15 secondary groups.
  • 7. Groups ● Changing primary and secondary group of users. ● Creating users with specific primary and secondary groups ● Changing group name ● Deleting users from groups with new gained knowledge of primary and secondary groups
  • 8. System Wide environment ● Setting environment variables specific to an user ● Setting environment variables for all users (/etc/environment file) ● Using /etc/profile.d to create not so simple scripts that needs to be executed every time any user opens a login shell to set any variable or any profile ● Setting user specific profile using .bash_profile, .bash_login, .profile
  • 9. sudo command and sudoers file ● sudo: Command to execute command as any other user (sudo -i and sudo -u <command>) ● Editing /etc/sudoers file using visudo command ● sudoers file syntax: ○ User/group ○ Host based on which rules will be executed ○ Users and groups which can be used to execute the commands ○ Commands that can be executed ● Only root user can run sbin binaries
  • 10. Cheatsheet Command Description useradd Command to create an user usermod Command to modify user details userdel Command to delete user groupadd Command to create a group groupdel Command to delete a group gpasswd Command to add and remove user to and from a group sudo Execute command as another user su Switch user chage Manage user account and password lifecycle visudo Command to edit sudoers file(/etc/sudoers) /etc/skel Directory from which new home directory is copied /etc/environment System wide environment file /etc/passwd File holds user details /etc/profile.d Directory holds script that are execute on every user login /etc/sudoers Sudoers file
  • 11. Thank You ! Get in touch with us: Lorem Studio, Lord Building D4456, LA, USA