SlideShare una empresa de Scribd logo
1 de 39
Chapter 11:
      Managing Users

The Complete Guide to Linux System
         Administration
Objectives

• Create and manage user accounts
• Manage complex file permissions
• Review advanced user security issues




The Complete Guide to Linux System Administration
                                           2
Creating and Managing User
              Accounts
• Process of creating new user accounts
   – Add default files to be part of every user’s home
     directory to /etc/skel directory
   – Create home directory for all users
   – Configure default settings for all users
   – Create groups
   – Create user account for each person
   – Create valid password for each user



The Complete Guide to Linux System Administration
                                           3
Managing User Accounts
             Graphically
• /etc/passwd file defines user accounts, including:
   –   User name           – Comment field
   –   Password            – User’s home directory
   –   UID                 – User’s default shell
   –   GID
• vipw command edits /etc/passwd file
• passwd command defines password



The Complete Guide to Linux System Administration
                                           4
Managing User Accounts
          Graphically (continued)
• Utilities to create new user accounts
   – Graphical tools
   – Command-line utilities
• system-config-users utility
   –   Red Hat graphical user account creation tool
   –   Information from /etc/passwd file shown in window
   –   Can edit each fields
   –   Edit password information stored in /etc/shadow


The Complete Guide to Linux System Administration
                                           5
Managing User Accounts
        Graphically (continued)




The Complete Guide to Linux System Administration
                                           6
Managing User Accounts
          Graphically (continued)
• User Properties dialog, User Data tab
   –   User name
   –   Full name
   –   Password and confirm password
   –   Home directory
   –   Login shell
• User Properties dialog, Account Info tab
   – Enable account expiration
   – Lock local password

The Complete Guide to Linux System Administration
                                           7
Managing User Accounts
        Graphically (continued)
• User Properties dialog, Password Info tab
   – View when user last changed password
   – Enable password expiration
• Experts recommend changing password every
  30 to 60 days
• User Properties dialog, Groups tab
   – Lists groups from /etc/group file
   – Each user assigned primary group


The Complete Guide to Linux System Administration
                                           8
Managing User Accounts
          Graphically (continued)
• User private group model
   – Used by Red Hat Linux and Fedora
   – User’s primary group has same name as user
   – Contains only user as member
• Create new user
   –   system-config-users utility
   –   Add User button
   –   Enter information on dialog
   –   Utility creates home directory based on user name

The Complete Guide to Linux System Administration
                                           9
Managing User Accounts
         Graphically (continued)
• /etc/login.defs file
   – Stores settings used to create new users
   – Comments describe settings
• Create new group
   – Click Add Group button
   – Enter group name




The Complete Guide to Linux System Administration
                                           10
Managing User Accounts
        Graphically (continued)
• Delete user
   – Select user name on Users tab
   – Click delete button
   – Some administrators prefer to permanently
     disable, not delete




The Complete Guide to Linux System Administration
                                           11
Creating New Users at the
            Command Line
• useradd utility
   – Create new users
   – Must be logged in as root
   – Example: useradd -g sales -c “Raley Solomon"
     rsolomon
   – -D option displays the default settings
   – Edit /etc/default/useradd to change defaults




The Complete Guide to Linux System Administration
                                           12
Creating New Users at the
      Command Line (continued)
• passwd command
   – Change user’s password
   – Lock user account: passwd -l thomas
   – Unlock account: passwd -u thomas




The Complete Guide to Linux System Administration
                                           13
Creating New Groups

• groupadd command
   – Preferred method for adding new group
   – Example: groupadd managers




The Complete Guide to Linux System Administration
                                           14
Modifying User and Group
  Accounts at the Command Line
• usermod command
   – Modify user account
   – Uses same options as useradd command
• groupmod command
   – Modify group
   – -g option: change GID
   – -n option: change name




The Complete Guide to Linux System Administration
                                           15
Modifying User and Group
  Accounts at the Command Line
           (continued)
• grpck command
   – Check integrity of /etc/group and /etc/gshadow
     files
   – Uses no parameters
• chage command
   –   Alter password aging information
   –   View password expiration
   –   Change aging for user
   –   Interactive mode

The Complete Guide to Linux System Administration
                                           16
Modifying User and Group
  Accounts at the Command Line
           (continued)
• pwconv utility converts older /etc/passwd
  password storage to /etc/shadow password
  storage
• pwunconv utility converts existing /etc/shadow
  passwords to older /etc/passwd system for
  compatibility
• pwck command shows formatting errors that
  make accounts unusable


The Complete Guide to Linux System Administration
                                           17
Automating Home Directory
             Creation
• Files in /etc/skel automatically copied into each
  user’s home directory
   – At time account created
   – Includes hidden configuration files
   – Files not added to existing user home directories




The Complete Guide to Linux System Administration
                                           18
Disabling User Accounts

• Temporarily disable user’s account
   – Change password
      • passwd command
   – passwd -l [username] to lock account
   – Edit /etc/shadow file in text editor
      • Place asterisk before encrypted password
   – Place # at beginning of line for user account in
     /etc/passwd
      • Make line into comment


The Complete Guide to Linux System Administration
                                           19
Disabling User Accounts
               (continued)
• userdel command
   – Delete user account permanently
   – Does not remove user’s home directory or
     contents
• groupdel command
   – Remove group
   – Be careful deleting groups




The Complete Guide to Linux System Administration
                                           20
Complex File Permissions

• Sticky bit
   – Directory can only be renamed or unlinked by
      • User that owns it
      • root
   – Often used on directories all users should be able
     to create files such as /tmp
   – To set: chmod a+t /tmp




The Complete Guide to Linux System Administration
                                           21
Complex File Permissions
             (continued)
• Set user ID permission
   – SUID
   – Can be added to file that has execute permission
     set
   – Causes user who executes file to take on file
     permissions of owner of file
   – Very useful for few specialized programs
   – To set: chmod u+s file



The Complete Guide to Linux System Administration
                                           22
Complex File Permissions
             (continued)
• Permissions not always what they seem at first
• Set group ID permission
   – SGID
   – Person who executes program has permissions of
     file’s group while executing program
   – To set: chmod g+s file
   – Can also be set numerically




The Complete Guide to Linux System Administration
                                           23
Complex File Permissions
              (continued)
• SGID set on directory
   – Any file created within directory assigned to group
     of directory
• Permissions examined in order
   –   Owner first
   –   Group second
   –   Others third
   –   Can deny group permission without users having
       other permission

The Complete Guide to Linux System Administration
                                           24
User Security Issues

• Other ways of securing Linux
   – Additional communications
   – User security mechanisms




The Complete Guide to Linux System Administration
                                           25
Communicating with Users

• /etc/motd file
   – Contents displayed just before shell is started
     each time user logs in
   – “Message of the day”
   – Does not appear unless:
      • User opens command line
      • Or logs in at text-mode console




The Complete Guide to Linux System Administration
                                           26
Communicating with Users
           (continued)
• wall command
   – Write all
   – Communicate immediate message to all users
     who are logged in to system
   – Displays broadcast message on command line for
     all users
      • Working in text mode
      • Or with open terminal window



The Complete Guide to Linux System Administration
                                           27
Communicating with Users
           (continued)
• fuser command
   – Learn about what users are doing
   – View users accessing
      • File system
      • Serial port
      • Network connection
   – -k option kills processes




The Complete Guide to Linux System Administration
                                           28
Granting Limited Root Access

• sudo command
   – Assign root privileges to any user account
   – User can execute just programs that sudo
     configuration specifies
• /etc/sudoers configuration file
   – Syntax can be very complex
   – Basic format: user host = command_list




The Complete Guide to Linux System Administration
                                           29
Granting Limited Root Access
            (continued)
• /etc/sudoers configuration file
   – Can define aliases for:
      •   Collection of users
      •   Collection of hosts
      •   Collection of programs
      •   Set of sudo options
• visudo program edits /etc/sudoers file
• System administrator must hand out sudo power
  carefully

The Complete Guide to Linux System Administration
                                           30
Using Pluggable Authentication
             Modules
• Pluggable authentication module (PAM)
   – Architecture and set of libraries
   – Programmer can create module to perform
     specific security-related function
   – System administrators can select, configure, and
     use one or more modules
      • Control operation of program that is aware of PAM
        capabilities
   – Configured by default for Red Hat Linux


The Complete Guide to Linux System Administration
                                           31
Using Pluggable Authentication
       Modules (continued)
• To use PAM, select PAM modules for program
• Configured using:
   – Single configuration file /etc/pam.conf
   – Series of configuration files in directory /etc/pam.d
   – Person compiling software selects which
     configuration style is used




The Complete Guide to Linux System Administration
                                           32
Using Pluggable Authentication
       Modules (continued)
• Red Hat Linux and Fedora use directory
  configuration method
• /etc/pam.d directory contains file with name
  matching program being configured
• When PAM-compatible program executed,
  checks to see which applicable modules are
  configured for given task
• Stacked modules
   – Multiple modules are listed for module type

The Complete Guide to Linux System Administration
                                           33
Using Pluggable Authentication
       Modules (continued)
• control_flag element
   – Determines how PAM processes stacked modules
   – Has two forms




The Complete Guide to Linux System Administration
                                           34
Using Network Information
               Service
• Network Information Service (NIS)
   – Lets system administrator manage single set of
     configuration files for multiple Linux servers
   – Sometimes called yellow pages service or yp
• When user logs in, server contacts NIS server to
  see if user has valid user account




The Complete Guide to Linux System Administration
                                           35
Using Network Information
         Service (continued)
• NIS+ or NISplus
   – More recent version of NIS
• authconfig program
   – Set up system to use NIS server
• /etc/nsswitch.conf file
   – Instructs various system programs in Linux on
     where to look for configuration information
   – Often includes multiple options


The Complete Guide to Linux System Administration
                                           36
Summary

• User accounts can be managed graphically
• useradd command creates user accounts on the
  command line
• usermod command modifies existing user
  accounts
• User accounts can be disabled using various
  methods



The Complete Guide to Linux System Administration
                                           37
Summary (continued)

• SUID and SGID permissions cause user to
  assume permissions of owner of executable file
  when program is executed
• Sticky bit and other special file permissions allow
  administrators to control shared files
• Administrators can broadcast messages to users
• sudo program lets regular users perform tasks
  that require root privileges


The Complete Guide to Linux System Administration
                                           38
Summary (continued)

• PAMs provide flexible and powerful way for
  system administrators to configure exactly how
  user security is handled
• NIS or NIS+ server
   – Multiple systems can share user files




The Complete Guide to Linux System Administration
                                           39

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

cisco
ciscocisco
cisco
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
 
Linux
Linux Linux
Linux
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Linux lecture6
Linux lecture6Linux lecture6
Linux lecture6
 
Unix features, posix and single unix specification
Unix features, posix and single unix specificationUnix features, posix and single unix specification
Unix features, posix and single unix specification
 
Linux
LinuxLinux
Linux
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linux
 
Introduction about linux
Introduction about linuxIntroduction about linux
Introduction about linux
 
Linux administration training from hyderabad
Linux administration training from hyderabadLinux administration training from hyderabad
Linux administration training from hyderabad
 
Unix Introduction
Unix IntroductionUnix Introduction
Unix Introduction
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson202 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
 
UNIX Operating System ppt
UNIX Operating System pptUNIX Operating System ppt
UNIX Operating System ppt
 
Unix - An Introduction
Unix - An IntroductionUnix - An Introduction
Unix - An Introduction
 
Linux User Management
Linux User ManagementLinux User Management
Linux User Management
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server Administration
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 

Destacado

Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux AdministrationEdureka!
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linuxZkre Saleh
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structureSreenatha Reddy K R
 
Project training
Project trainingProject training
Project trainingmsudan92
 
неформальные молодёжные движения
неформальные молодёжные движениянеформальные молодёжные движения
неформальные молодёжные движенияDemanessa
 
Java projects
Java projectsJava projects
Java projectsmsudan92
 
методичка наша
методичка нашаметодичка наша
методичка нашаDemanessa
 
Plain Language Legal Information
Plain Language Legal InformationPlain Language Legal Information
Plain Language Legal InformationAnnick Gariépy
 
программа профилактики суицидального поведения
программа профилактики суицидального поведенияпрограмма профилактики суицидального поведения
программа профилактики суицидального поведенияDemanessa
 
кислицын максим
кислицын максимкислицын максим
кислицын максимDemanessa
 
Rừng Na Uy ebook - Murakami Haruki
Rừng Na Uy ebook - Murakami Haruki Rừng Na Uy ebook - Murakami Haruki
Rừng Na Uy ebook - Murakami Haruki Duyệt Đoàn
 
Зелене диво
Зелене дивоЗелене диво
Зелене дивоcherkaska
 
学習からみた基本
学習からみた基本学習からみた基本
学習からみた基本Minoru Uchida
 
презентация г.п.логинова
презентация г.п.логиновапрезентация г.п.логинова
презентация г.п.логиноваDemanessa
 
0902861264 Cho thuê mua bán carina plaza MS Trang
0902861264 Cho thuê mua bán carina plaza MS Trang0902861264 Cho thuê mua bán carina plaza MS Trang
0902861264 Cho thuê mua bán carina plaza MS TrangBin Nấm
 

Destacado (20)

Ch02 system administration
Ch02 system administration Ch02 system administration
Ch02 system administration
 
Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux Administration
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Project training
Project trainingProject training
Project training
 
неформальные молодёжные движения
неформальные молодёжные движениянеформальные молодёжные движения
неформальные молодёжные движения
 
Java projects
Java projectsJava projects
Java projects
 
Plaza District Parking Blueprint
Plaza District Parking BlueprintPlaza District Parking Blueprint
Plaza District Parking Blueprint
 
методичка наша
методичка нашаметодичка наша
методичка наша
 
Plain Language Legal Information
Plain Language Legal InformationPlain Language Legal Information
Plain Language Legal Information
 
программа профилактики суицидального поведения
программа профилактики суицидального поведенияпрограмма профилактики суицидального поведения
программа профилактики суицидального поведения
 
The Plan
The PlanThe Plan
The Plan
 
кислицын максим
кислицын максимкислицын максим
кислицын максим
 
Rừng Na Uy ebook - Murakami Haruki
Rừng Na Uy ebook - Murakami Haruki Rừng Na Uy ebook - Murakami Haruki
Rừng Na Uy ebook - Murakami Haruki
 
Зелене диво
Зелене дивоЗелене диво
Зелене диво
 
学習からみた基本
学習からみた基本学習からみた基本
学習からみた基本
 
презентация г.п.логинова
презентация г.п.логиновапрезентация г.п.логинова
презентация г.п.логинова
 
0902861264 Cho thuê mua bán carina plaza MS Trang
0902861264 Cho thuê mua bán carina plaza MS Trang0902861264 Cho thuê mua bán carina plaza MS Trang
0902861264 Cho thuê mua bán carina plaza MS Trang
 
Saoirse M
Saoirse MSaoirse M
Saoirse M
 

Similar a Ch11

Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxdulala3
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9APSU
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9APSU
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNGene Kartavtsev
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptxGanesh Bhosale
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1sdiviney
 
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissionsShay Cohen
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.comComandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.comWlademir RS
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux Harish R
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheetWe Ihaveapc
 
Linux week 2
Linux week 2Linux week 2
Linux week 2Vinoth Sn
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadRavikumar Nandigam
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in LinuxKnoldus Inc.
 
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 PermissionsAhmed El-Arabawy
 

Similar a Ch11 (20)

Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
 
Net essentials6e ch9
Net essentials6e ch9Net essentials6e ch9
Net essentials6e ch9
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MN
 
Linux lecture
Linux lectureLinux lecture
Linux lecture
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptx
 
Basic linux day 5
Basic linux day 5Basic linux day 5
Basic linux day 5
 
Unix Administration 3
Unix Administration 3Unix Administration 3
Unix Administration 3
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissions
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.comComandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheet
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in Hyderabad
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups 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
 

Último

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
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
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 

Último (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
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
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
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.
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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...
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

Ch11

  • 1. Chapter 11: Managing Users The Complete Guide to Linux System Administration
  • 2. Objectives • Create and manage user accounts • Manage complex file permissions • Review advanced user security issues The Complete Guide to Linux System Administration 2
  • 3. Creating and Managing User Accounts • Process of creating new user accounts – Add default files to be part of every user’s home directory to /etc/skel directory – Create home directory for all users – Configure default settings for all users – Create groups – Create user account for each person – Create valid password for each user The Complete Guide to Linux System Administration 3
  • 4. Managing User Accounts Graphically • /etc/passwd file defines user accounts, including: – User name – Comment field – Password – User’s home directory – UID – User’s default shell – GID • vipw command edits /etc/passwd file • passwd command defines password The Complete Guide to Linux System Administration 4
  • 5. Managing User Accounts Graphically (continued) • Utilities to create new user accounts – Graphical tools – Command-line utilities • system-config-users utility – Red Hat graphical user account creation tool – Information from /etc/passwd file shown in window – Can edit each fields – Edit password information stored in /etc/shadow The Complete Guide to Linux System Administration 5
  • 6. Managing User Accounts Graphically (continued) The Complete Guide to Linux System Administration 6
  • 7. Managing User Accounts Graphically (continued) • User Properties dialog, User Data tab – User name – Full name – Password and confirm password – Home directory – Login shell • User Properties dialog, Account Info tab – Enable account expiration – Lock local password The Complete Guide to Linux System Administration 7
  • 8. Managing User Accounts Graphically (continued) • User Properties dialog, Password Info tab – View when user last changed password – Enable password expiration • Experts recommend changing password every 30 to 60 days • User Properties dialog, Groups tab – Lists groups from /etc/group file – Each user assigned primary group The Complete Guide to Linux System Administration 8
  • 9. Managing User Accounts Graphically (continued) • User private group model – Used by Red Hat Linux and Fedora – User’s primary group has same name as user – Contains only user as member • Create new user – system-config-users utility – Add User button – Enter information on dialog – Utility creates home directory based on user name The Complete Guide to Linux System Administration 9
  • 10. Managing User Accounts Graphically (continued) • /etc/login.defs file – Stores settings used to create new users – Comments describe settings • Create new group – Click Add Group button – Enter group name The Complete Guide to Linux System Administration 10
  • 11. Managing User Accounts Graphically (continued) • Delete user – Select user name on Users tab – Click delete button – Some administrators prefer to permanently disable, not delete The Complete Guide to Linux System Administration 11
  • 12. Creating New Users at the Command Line • useradd utility – Create new users – Must be logged in as root – Example: useradd -g sales -c “Raley Solomon" rsolomon – -D option displays the default settings – Edit /etc/default/useradd to change defaults The Complete Guide to Linux System Administration 12
  • 13. Creating New Users at the Command Line (continued) • passwd command – Change user’s password – Lock user account: passwd -l thomas – Unlock account: passwd -u thomas The Complete Guide to Linux System Administration 13
  • 14. Creating New Groups • groupadd command – Preferred method for adding new group – Example: groupadd managers The Complete Guide to Linux System Administration 14
  • 15. Modifying User and Group Accounts at the Command Line • usermod command – Modify user account – Uses same options as useradd command • groupmod command – Modify group – -g option: change GID – -n option: change name The Complete Guide to Linux System Administration 15
  • 16. Modifying User and Group Accounts at the Command Line (continued) • grpck command – Check integrity of /etc/group and /etc/gshadow files – Uses no parameters • chage command – Alter password aging information – View password expiration – Change aging for user – Interactive mode The Complete Guide to Linux System Administration 16
  • 17. Modifying User and Group Accounts at the Command Line (continued) • pwconv utility converts older /etc/passwd password storage to /etc/shadow password storage • pwunconv utility converts existing /etc/shadow passwords to older /etc/passwd system for compatibility • pwck command shows formatting errors that make accounts unusable The Complete Guide to Linux System Administration 17
  • 18. Automating Home Directory Creation • Files in /etc/skel automatically copied into each user’s home directory – At time account created – Includes hidden configuration files – Files not added to existing user home directories The Complete Guide to Linux System Administration 18
  • 19. Disabling User Accounts • Temporarily disable user’s account – Change password • passwd command – passwd -l [username] to lock account – Edit /etc/shadow file in text editor • Place asterisk before encrypted password – Place # at beginning of line for user account in /etc/passwd • Make line into comment The Complete Guide to Linux System Administration 19
  • 20. Disabling User Accounts (continued) • userdel command – Delete user account permanently – Does not remove user’s home directory or contents • groupdel command – Remove group – Be careful deleting groups The Complete Guide to Linux System Administration 20
  • 21. Complex File Permissions • Sticky bit – Directory can only be renamed or unlinked by • User that owns it • root – Often used on directories all users should be able to create files such as /tmp – To set: chmod a+t /tmp The Complete Guide to Linux System Administration 21
  • 22. Complex File Permissions (continued) • Set user ID permission – SUID – Can be added to file that has execute permission set – Causes user who executes file to take on file permissions of owner of file – Very useful for few specialized programs – To set: chmod u+s file The Complete Guide to Linux System Administration 22
  • 23. Complex File Permissions (continued) • Permissions not always what they seem at first • Set group ID permission – SGID – Person who executes program has permissions of file’s group while executing program – To set: chmod g+s file – Can also be set numerically The Complete Guide to Linux System Administration 23
  • 24. Complex File Permissions (continued) • SGID set on directory – Any file created within directory assigned to group of directory • Permissions examined in order – Owner first – Group second – Others third – Can deny group permission without users having other permission The Complete Guide to Linux System Administration 24
  • 25. User Security Issues • Other ways of securing Linux – Additional communications – User security mechanisms The Complete Guide to Linux System Administration 25
  • 26. Communicating with Users • /etc/motd file – Contents displayed just before shell is started each time user logs in – “Message of the day” – Does not appear unless: • User opens command line • Or logs in at text-mode console The Complete Guide to Linux System Administration 26
  • 27. Communicating with Users (continued) • wall command – Write all – Communicate immediate message to all users who are logged in to system – Displays broadcast message on command line for all users • Working in text mode • Or with open terminal window The Complete Guide to Linux System Administration 27
  • 28. Communicating with Users (continued) • fuser command – Learn about what users are doing – View users accessing • File system • Serial port • Network connection – -k option kills processes The Complete Guide to Linux System Administration 28
  • 29. Granting Limited Root Access • sudo command – Assign root privileges to any user account – User can execute just programs that sudo configuration specifies • /etc/sudoers configuration file – Syntax can be very complex – Basic format: user host = command_list The Complete Guide to Linux System Administration 29
  • 30. Granting Limited Root Access (continued) • /etc/sudoers configuration file – Can define aliases for: • Collection of users • Collection of hosts • Collection of programs • Set of sudo options • visudo program edits /etc/sudoers file • System administrator must hand out sudo power carefully The Complete Guide to Linux System Administration 30
  • 31. Using Pluggable Authentication Modules • Pluggable authentication module (PAM) – Architecture and set of libraries – Programmer can create module to perform specific security-related function – System administrators can select, configure, and use one or more modules • Control operation of program that is aware of PAM capabilities – Configured by default for Red Hat Linux The Complete Guide to Linux System Administration 31
  • 32. Using Pluggable Authentication Modules (continued) • To use PAM, select PAM modules for program • Configured using: – Single configuration file /etc/pam.conf – Series of configuration files in directory /etc/pam.d – Person compiling software selects which configuration style is used The Complete Guide to Linux System Administration 32
  • 33. Using Pluggable Authentication Modules (continued) • Red Hat Linux and Fedora use directory configuration method • /etc/pam.d directory contains file with name matching program being configured • When PAM-compatible program executed, checks to see which applicable modules are configured for given task • Stacked modules – Multiple modules are listed for module type The Complete Guide to Linux System Administration 33
  • 34. Using Pluggable Authentication Modules (continued) • control_flag element – Determines how PAM processes stacked modules – Has two forms The Complete Guide to Linux System Administration 34
  • 35. Using Network Information Service • Network Information Service (NIS) – Lets system administrator manage single set of configuration files for multiple Linux servers – Sometimes called yellow pages service or yp • When user logs in, server contacts NIS server to see if user has valid user account The Complete Guide to Linux System Administration 35
  • 36. Using Network Information Service (continued) • NIS+ or NISplus – More recent version of NIS • authconfig program – Set up system to use NIS server • /etc/nsswitch.conf file – Instructs various system programs in Linux on where to look for configuration information – Often includes multiple options The Complete Guide to Linux System Administration 36
  • 37. Summary • User accounts can be managed graphically • useradd command creates user accounts on the command line • usermod command modifies existing user accounts • User accounts can be disabled using various methods The Complete Guide to Linux System Administration 37
  • 38. Summary (continued) • SUID and SGID permissions cause user to assume permissions of owner of executable file when program is executed • Sticky bit and other special file permissions allow administrators to control shared files • Administrators can broadcast messages to users • sudo program lets regular users perform tasks that require root privileges The Complete Guide to Linux System Administration 38
  • 39. Summary (continued) • PAMs provide flexible and powerful way for system administrators to configure exactly how user security is handled • NIS or NIS+ server – Multiple systems can share user files The Complete Guide to Linux System Administration 39