how to know expire date for user linux 1

how to know expire date for user linux

chage -l my_user

Here is what the above code is Doing:
1. We’re importing the os module, which will allow us to use the os.system() function.
2. We’re importing the sys module, which will allow us to use the sys.argv list.
3. We’re creating a variable called user, which will be set to the first argument passed to the script.
4. We’re creating a variable called command, which will be set to the string “userdel -r” and the user variable.
5. We’re using the os.system() function to run the command variable.

Similar Posts