bash scripting help for user administration

Create a script that can be run from the crontab or the command line that helps you administer accounts. The script should allow accounts to be created, modified and account status to be reported. The script should be able to do the following:

  • Report all the users that don’t have a password
    o If an account does not have a password, the program will automatically lock the account andreport that the account has been locked
  • Report all expired accounts
  • Report the expiration date/time for all accounts
  • Report all accounts that do not expire
  • Unlock or Lock user accounts specified on the command line
  • Add a user account to the system (interactive only – not run from the crontab)o Specify the username, home directory, user’s full name, password, and expiration date.
     You should be able to specify the usernames to be created on the command line or from afile specified on the command line. The script should either query for the detailedinformation or read it from the file.
    o When adding an account, the user should have to reset their password upon first login into thesystem.
  • Change the expiration date for users specified on the command lineo Do not allow the root account to have an expiration date.
  • The script should be able to write the results to a log file specified on the command lineThe script(s) should run on your Linux system. You will not be able to run them on the university’s servers. You will need to run it as a privileged user. You can use any of the following scripting languages as the main programing language: bash, sh, ksh, perl and python.