Using Python for System Administration

This track is now CLOSED, but you can be added to the "wait list" and be notified if and when space opens up. Simply select the "wait list" option when you register.


Please note that this is not an asynchronous on-line track. Everyone is expected to log in every day all day according to the Winter Working Connections schedule. This is a synchronous track.


This on-line Working Connections event is intended solely for the person who registers. No link sharing is permitted.


Description

This class is designed to be an introduction to the Python scripting language. The focus of the class will be to immediately apply the concepts learned in order to accomplish system administration tasks. The design of the class will be to discuss programming concepts as they are implemented in Python and then to apply them to IT related projects.

This course will be similar to the "Introduction to Python" course taught at the Summer Working Connections 2015 session. It will include projects designed to practice the Python programming techniques discussed in class. Some of the projects will overlap with the previous class. But even with the overlapping projects, there will be new material. As with the previous class, I will have a detailed OneNote document to accompany the class as well as my solutions to all of the projects.

Being able to automate common tasks is a valuable skill for IT professionals to have. This class will focus on how Python can be used to implement that automation. It has in mind people whose primary job (or teaching responsibility) is not programming, but who are still interested in learning how Python can be used for improving the efficiency of administrative tasks.

Prerequisites

Students should have an understanding of Linux system administration. Students should also have some understanding of basic programming concepts such as variables, loops and decisions.

For a quick refresher on Linux basics, please consider reviewing Chapters 4, 5, 7, 8, 12, 14, 15, and 29 of Linux Administration: A Beginner's Guide:
http://www.e-reading.club/bookreader.php/136054/Soyinka_ _Linux_Administration__A_Beginner's_Guide,_5_Edition.pdf

Instructor

Paul2.jpg
Paul Gordon - Wisconsin Indianhead Technical College
Paul Gordon has been teaching IT classes for 13 years. He teaches, a variety of subjects including Windows and Linux operating systems, CCNA, Information Security, Windows Server, Windows and VMware virtualization, Storage and database administration. He has or has had the following certifications: VCP 4, VCP 5, CCNA, CCNA Security, Linux+, Security+, Net+ and A+. Prior to being an instructor, he worked as a system administrator where he learned to use scripting to automate system tasks.

Three Objectives

1. Learn how Python implements basic programming constructs
2. Explore Python modules and data structures
3. Gain experience writing and testing Python scripts for IT administration

Agenda

  • Discussing basic programming constructs
  • Discuss executing external programs in Python
  • Monitoring system disk usage
  • Monitoring CPU usage
  • Discuss functions
  • Discuss User input
  • Monitoring user disk usage
  • Managing users: (Unlock a user, Change a user's password, Set the expiration date on a user/group of users, Determine last user logon time)
  • Discuss python modules
  • Discuss text manipulation
  • Create users: (Set password to default password, Force user to change password at next logon, Batch user add from database export, Create usernames to match naming convention, Input validation, Add user to group based on job description/department)
  • Discuss filtering data: (Regular expressions module)
  • Log parsing: (Monitor a "junior administrators" use of sudo, Monitor a user's logon and logoff time)
  • Backup and archiving
  • Creating an SNMP interface

Resources

Instructor Links

https://docs.python.org/2/tutorial/
https://docs.python.org/2.7/library/index.html
http://docs.linuxtone.org/ebooks/Python/OReilly.Python.for.Unix.and.Linux.System.Administration.Sep.2008.pdf