Automating Regular Administrative Activities

There are various administrative activities performed by system administrators. These activities may contain file handling, logging, administrating CPU and memory, password handling, and, most importantly, making backups. These activities need automation. In this chapter, we're going to learn about automating these activities using Python.

In this chapter, we will cover the following topics:

  • Accepting input by redirection, pipe, and input files
  • Handling passwords at runtime in scripts
  • Executing external commands and getting their output
  • Prompting for a password during runtime and validation
  • Reading configuration files
  • Adding logging and warning code to scripts
  • Putting limits on CPU and memory usage
  • Launching a web browser
  • Using the os module for handling directory and files
  • Making backups (with rsync)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset