Linux Networking and Security Chapter 9 User Security
User Security <ul><li>Follow good password security practices </li></ul><ul><li>Understand Linux Pluggable Authentication ...
Managing Password Security <ul><li>One of the ways to access services on a Linux system is to log in as a user on that sys...
Selecting Strong Passwords <ul><li>Passwords must not be written down, especially not anywhere near the computer to which ...
Selecting Strong Passwords <ul><li>Ideas for creating good passwords: </li></ul><ul><ul><li>A minimum of eight characters ...
Selecting Strong Passwords <ul><li>Using strong passwords reduces the possibility of a cracker utilizing social engineerin...
Managing Linux Passwords <ul><li>Linux includes several facilities for managing passwords and enabling security measures <...
Managing Linux Passwords <ul><li>A user can change their password using the passwd utility </li></ul><ul><li>When this com...
Managing Linux Passwords
Managing Linux Passwords
Using Pluggable Authentication Modules <ul><li>The Pluggable Authentication Module (PAM) architecture was developed by Sun...
Using Pluggable Authentication Modules <ul><li>PAM is configured using either a single file, etc/pam.conf, or a series of ...
Using Pluggable Authentication Modules <ul><li>The control_flag element determines how PAM processes stacked modules, and ...
Using Pluggable Authentication Modules
Using Pluggable Authentication Modules
Security Tools for Users <ul><li>There are many security utilities and related files that system administrators and users ...
Security Tools for Users
Security Tools for Users
Security Files and Utilities <ul><li>Linux provides several methods for safeguarding or controlling the login process: </l...
Security Files and Utilities <ul><li>More Linux-provided security methods: </li></ul><ul><ul><li>The Linux file systems su...
Security Files and Utilities
Seeing Who Is Using Linux
Seeing Who Is Using Linux
Chapter Summary <ul><li>A user account provides much fuller access to a Linux system than accessing a network service such...
Chapter Summary <ul><li>System administrators can control how users manage their passwords using features of the shadow pa...
Chapter Summary <ul><li>PAM control flags determine how PAM processes a stack of multiple modules to reach a final determi...
Chapter Summary <ul><li>Screen saver programs such as those included with KDE and Gnome offer screen-locking capability, b...
Chapter Summary <ul><li>Users can be logged out automatically after a period of inactivity when an environment variable in...
Chapter Summary <ul><li>Use of sudo is configured by the /etc/sudoers text file, which must be edited using  the utility /...
Upcoming SlideShare
Loading in …5
×

Chapter 09

524 views
462 views

Published on

CS325

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
524
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter 09

  1. 1. Linux Networking and Security Chapter 9 User Security
  2. 2. User Security <ul><li>Follow good password security practices </li></ul><ul><li>Understand Linux Pluggable Authentication Modules (PAM) </li></ul><ul><li>Use common utilities to promote user security </li></ul><ul><li>Set up user access to system administration tasks with sudo </li></ul>
  3. 3. Managing Password Security <ul><li>One of the ways to access services on a Linux system is to log in as a user on that system </li></ul><ul><ul><li>The user must have a valid user account </li></ul></ul><ul><ul><li>The user must enter the password corresponding to that user ID </li></ul></ul><ul><li>Selecting good passwords and keeping them secure is crucial to good system security </li></ul>
  4. 4. Selecting Strong Passwords <ul><li>Passwords must not be written down, especially not anywhere near the computer to which they provide access </li></ul><ul><li>Passwords must be chosen carefully so they can be remembered without a written aid </li></ul><ul><li>Passwords should not include easily guessed words or numbers </li></ul><ul><li>Users should be taught to never to tell anyone their password </li></ul>
  5. 5. Selecting Strong Passwords <ul><li>Ideas for creating good passwords: </li></ul><ul><ul><li>A minimum of eight characters should be sufficient </li></ul></ul><ul><ul><li>It should include at least one number or symbol </li></ul></ul><ul><ul><li>It could be one or more words separated by one or more symbols or numbers </li></ul></ul><ul><ul><li>Multiple words works better if they are foreign or altered so that they do not appear in a dictionary </li></ul></ul><ul><ul><li>Using a series of numbers or a pattern of altered letters can make it easier to remember your password </li></ul></ul>
  6. 6. Selecting Strong Passwords <ul><li>Using strong passwords reduces the possibility of a cracker utilizing social engineering to gain access to your system </li></ul><ul><li>Crackers can resort to brute force attacks where all possible combinations are tried until one succeeds in guessing a password </li></ul><ul><li>Some system administrators use password cracking tools to randomly test the strength of user’s passwords </li></ul>
  7. 7. Managing Linux Passwords <ul><li>Linux includes several facilities for managing passwords and enabling security measures </li></ul><ul><li>When a new user account is added to the system, a single line is added to the /etc/password file, but the actual encrypted password is stored in /etc/shadow </li></ul><ul><li>The shadow password file controls the username, the encrypted password data, last password change date, password expiration date, account expiration date, and more </li></ul>
  8. 8. Managing Linux Passwords <ul><li>A user can change their password using the passwd utility </li></ul><ul><li>When this command is entered, the user is prompted to enter their current password, then their new password two times </li></ul><ul><li>passwd will perform a few basic checks on the entered password, but it can’t prevent the use of poor passwords </li></ul><ul><li>The shadow password system is used by default on all major Linux distributions </li></ul>
  9. 9. Managing Linux Passwords
  10. 10. Managing Linux Passwords
  11. 11. Using Pluggable Authentication Modules <ul><li>The Pluggable Authentication Module (PAM) architecture was developed by Sun and is now used on virtually every Linux distribution </li></ul><ul><li>PAM provides improved user-level security, flexibility in managing user authentication and smoother Linux to non-Linux data integration </li></ul><ul><li>To use PAM, select the modules necessary to to control the activity of a program, and list them in the program’s configuration file </li></ul>
  12. 12. Using Pluggable Authentication Modules <ul><li>PAM is configured using either a single file, etc/pam.conf, or a series of files in /etc/pam.d </li></ul><ul><li>PAM supports four module types: </li></ul><ul><ul><li>auth modules are used for identifying a user, normally by prompting for a password </li></ul></ul><ul><ul><li>account modules typically restrict account access </li></ul></ul><ul><ul><li>session modules tend to tasks required before user’s can work, such as creating a log file </li></ul></ul><ul><ul><li>password modules are executed when a user needs to change a password </li></ul></ul>
  13. 13. Using Pluggable Authentication Modules <ul><li>The control_flag element determines how PAM processes stacked modules, and ultimately to permit or deny access: </li></ul><ul><ul><li>required means all modules are executed and if one fails, access is denied </li></ul></ul><ul><ul><li>requisite means that if a module fails, remaining modules are not executed, and access is denied </li></ul></ul><ul><ul><li>sufficient means that the final result can be access permitted, even if this module fails </li></ul></ul><ul><ul><li>optional means that the result of the module does not affect the final result of the stack </li></ul></ul>
  14. 14. Using Pluggable Authentication Modules
  15. 15. Using Pluggable Authentication Modules
  16. 16. Security Tools for Users <ul><li>There are many security utilities and related files that system administrators and users need to be aware of, some PAM controlled </li></ul><ul><li>Screen locking programs disable keyboard input and hide the screen so that private information is not visible nor accessible </li></ul><ul><ul><li>vlock is used from a text console to lock the current screen, or all of the virtual consoles </li></ul></ul><ul><ul><li>xlock is similar to vlock, only it is employed from a graphical interface, and is a feature of X Windows </li></ul></ul>
  17. 17. Security Tools for Users
  18. 18. Security Tools for Users
  19. 19. Security Files and Utilities <ul><li>Linux provides several methods for safeguarding or controlling the login process: </li></ul><ul><ul><li>The root user can only log in from terminals that are listed in the file /etc/securetty </li></ul></ul><ul><ul><li>If the /etc/nologin file exists, only root can log in at that time and when this file is deleted, all users can log in again </li></ul></ul><ul><ul><li>Executable files can have a special file permission set (the Set UID bit, or SUID) that causes them to take on the permissions of the user who owns the file rather than the user who executed the file </li></ul></ul>
  20. 20. Security Files and Utilities <ul><li>More Linux-provided security methods: </li></ul><ul><ul><li>The Linux file systems support a number of attributes that can be set on any file </li></ul></ul><ul><ul><li>The PAM module pam_time can be used with the login program to limit when a user can log in </li></ul></ul><ul><ul><li>If the standard bash shell for Linux is running, an environment variable can be set which will log a user out after a certain number of idle seconds </li></ul></ul><ul><ul><li>In the tsch shell, an environment variable accomplishes the same thing, but in a matter of minutes, not seconds </li></ul></ul>
  21. 21. Security Files and Utilities
  22. 22. Seeing Who Is Using Linux
  23. 23. Seeing Who Is Using Linux
  24. 24. Chapter Summary <ul><li>A user account provides much fuller access to a Linux system than accessing a network service such as a Web server </li></ul><ul><li>Passwords should be guarded carefully to prevent crackers logging into a system with the appearance of authorized access </li></ul><ul><li>Good passwords are hard to guess because they are of sufficient length, do not contain dictionary words, and do not relate in simple or obvious way to personal information about the user </li></ul><ul><li>Brute force password attacks attempt to find a password by trial and error </li></ul>
  25. 25. Chapter Summary <ul><li>System administrators can control how users manage their passwords using features of the shadow password system, as managed by the passwd command </li></ul><ul><li>A Linux Pluggable Authentication Module (Linux PAM) lets administrators select among many methods of authenticating users and authorizing access </li></ul><ul><li>PAM modules support four types of control: auth for authentication, account for account management, session to initiate or end program use, and passwd to change authentication tokens (such as password) </li></ul>
  26. 26. Chapter Summary <ul><li>PAM control flags determine how PAM processes a stack of multiple modules to reach a final determination to permit or deny access </li></ul><ul><li>A second method of specifying PAM control flags lets you test the value of one or more of 30 different parameters and process other PAM modules in the stack based on the result </li></ul><ul><li>The Linux test-mode console can be locked while you are away from your monitor for a moment using the vlock command. The xlock command provides similar functionality within graphical environments </li></ul>
  27. 27. Chapter Summary <ul><li>Screen saver programs such as those included with KDE and Gnome offer screen-locking capability, but they cannot be activated without letting the requisite time expire for the screen saver to start </li></ul><ul><li>The securetty file lists where the root user can log in from; the nologin file, if it exists, stops everyone except root from logging in </li></ul><ul><li>File security involves watching for Set UID bits and reviewing the possibility of using file attributes to protect files from alteration </li></ul>
  28. 28. Chapter Summary <ul><li>Users can be logged out automatically after a period of inactivity when an environment variable in the command shell is set </li></ul><ul><li>Simple utilities like w, who, last, and lastcomm let users see detailed information about users on the Linux system, including how they are using the system </li></ul><ul><li>The sudo program lets a system administrator allow specific users to execute specific commands while acting as another user (including root) </li></ul>
  29. 29. Chapter Summary <ul><li>Use of sudo is configured by the /etc/sudoers text file, which must be edited using the utility /usr/sbin/visudo </li></ul><ul><li>Configuration of sudo is potentially very complex. Syntax is checked by visudo, but other potential security issues mean that administrators should set up and test sudo very carefully </li></ul>

×