Security Strategies in Linux Platforms and Applications Lesson 4 User Privileges and Permissions

24
© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.com All rights reserved. Security Strategies in Linux Platforms and Applications Lesson 4 User Privileges and Permissions

description

Security Strategies in Linux Platforms and Applications Lesson 4 User Privileges and Permissions. Learning Objective. Explain user account management and the principle of least privilege to protect and secure the system and its data. Key Concepts. Policies for user accounts - PowerPoint PPT Presentation

Transcript of Security Strategies in Linux Platforms and Applications Lesson 4 User Privileges and Permissions

Page 1: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Security Strategies in Linux Platforms and Applications

Lesson 4User Privileges and Permissions

Page 2: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 2Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Learning ObjectiveExplain user account management and the

principle of least privilege to protect and secure the system and its data.

Page 3: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 3Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Key ConceptsPolicies for user accounts Boundaries for the user, system, and root

accounts Group accounts for managing the security

process Pluggable Authentication Modules (PAM)Special user privileges for accessing files,

including the executable files

Page 4: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 4Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

DISCOVER: CONCEPTS

Page 5: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 5Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Defining the User Account PolicyWho needs access and why?How long does a user need access?Where will the user access the computer

system from?What are the tasks the user needs to

perform?

Page 6: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 6Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Best Practices for Account ManagementCreate a password policy in /etc/login.defs file.Lock user accounts that will not need access

for a long period of time.Set account expiration for temporary accounts.Remove user and service accounts that are no

longer being used.Monitor account usage and login attempts.

Page 7: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 7Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

System Account Service Account Regular Account

Created when the operating system is installed

Created automatically when installing a service using a package management program

Created by root or an account with privileged access

Users and groups < 100

Users and groups < 500

Users and groups > 500

Login directory typically set to /sbin/nologin or a system command, such as /sbin/shutdown

Login directory mostly set to /sbin/nologin but may also be set to a typical login shell, such as /bin/bash

Login directory set to /bin/bash

System, Service, and Regular User Accounts

Page 8: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 8Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

DISCOVER: PROCESS

Page 9: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 9Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Establishing a User Account Policy

1. Open the /etc/login.defs file.

2. Set the Password Change directive.

3. Set the Warn directive.

4. Set the password minimum length.

5. Enable login failure logging.

6. Enable successful login logging.

7. Enable the su command.

8. Save and exit.

Page 10: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 10Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Managing Password Change and Expiration Dates The following change commands are used to

enforce password change and expire accounts: The command to enable user “jdoe” to change

password at next login:[root@is418 ~]# chage -d 0 jdoe

The command to expire the user account “jane” on May 31, 2011:[root@is418 ~]# chage -E “05/31/2011” jane

Page 11: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 11Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Using sudo Command

1

As a root user, issue the following command:[root@is418 ~]# visudo

2

Enable ALL privileges to user “jdoe” by using the following command:jdoe ALL=(ALL) ALL

3

Login as “jdoe” and use the following sudo command:[jdoe@is418 ~]# sudo useradd maryj

Page 12: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 12Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

DISCOVER: ROLES

Page 13: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 13Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Linux System Administrator

Creates user accounts Enforces user account and password policy Establishes user account policy

Page 14: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 14Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Files with Access Control List (ACL) Permissions ACL grants special permissions that are not part

of the regular file permissions. These files are used to provide a user or group

special access to a file or executable without changing the file permissions.

Permissions can be granted to a user (u), a group (g), and others (o).

Permissions are typically read, write, and execute.

Page 15: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 15Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

DISCOVER: CONTEXTS

Page 16: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 16Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Group AccountGroups provide a way to better manage

accounts in the following ways:• Permissions can be given to a group rather

than individuals.• Employees can be added or deleted from

predefined groups.• Groups improve the maintainability of user

accounts.

Page 17: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 17Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

DISCOVER: RATIONALE

Page 18: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 18Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Using PAMAn application can use its own authentication

file in the /etc/pam.d directory.PAM can be used to:

• Allow access to specific application only during certain times of the day

• Deny user logins based on files and restrict the user of the su command to only certain groups or users

• Disconnect a user after ‘x’ number of login attempts

Page 19: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 19Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

PAM-related Packages on Ubuntu

Page 20: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 20Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Summary System, service, and regular user accounts,

group accounts, and user account policy Best practices for account management Process of establishing a user account policy,

managing password change, and using sudo command

Files with ACL permissions and the roles and responsibilities of a Linux system administrator

Use of PAM

Page 21: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 21Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

OPTIONAL SLIDES

Page 22: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 22Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

User Privileges as a Memberof Special Groups

Page 23: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 23Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

Failed Remote Login Attempts

Page 24: Security Strategies in Linux Platforms and Applications Lesson  4 User Privileges and  Permissions

Page 24Security Strategies in Linux Platforms and Applications© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company www.jblearning.comAll rights reserved.

PolicyKit Authorizations Tool