By using argparse in Python as an alternative to making use of the sys module and the argv array is a great solution to quickly give you more functionality.To understand this this we need to…
Our script to create user accounts is coming along. We left off last time having been able to create the user with an expiry date. The downside was that the user was hard coded into…
As with any scripting technology the power is in the looping constructs so that we can repeat code quickly and effectively. In this tutorial we look at using FOR loops first, simply to list and Python…
We introduce Python in our Linux Essentials mini series, but to kick of this series I have reused the python primer from our Linux essentials trainer to start us of here Although not explicitly part of the…
The output of lastlog is useful and shows you all the users and the date and time of their last login. Firstly though, we need to filter out the system accounts who never login. This is easy…
Now we know how to format the output in color, lets see what we may use this for. Searching though CSV files and highlighting names or products is one option and we will look at a script…