Assignment #4 Adduser And Cloud Computing Solution

$30.00 $26.40



In this assignment, you will be writing a shell script wrapper for user management using usermod, userdel, and useradd as building blocks. Include a verbose option to output what is happening step by step. Alongside this, you will be writing a python script that utilizes the AWS SDK to provision a t2.micro EC2 instance. For both of your scripts, create appropriate documentation in your git repo’s file.


No webcampus submission. Follow the link provided below to create a GitHub classroom repo to push your code to. I will be checking the two scripts and the readme for documentation.


For Git repo

Adduser Script:

  • Prompt for username, full name, and password

  • Create /etc/passwd, /etc/shadow, and /etc/group entries

    • Make sure syntax is correct before you make changes to actual files

    • For /etc/shadow, see sample code for generating password hash

  • Create home directory, chmod and chown it

AWS Script

  • Create SSH keypair to connect to instance with via aws SDK

    • create_key_pair() method: Documentation

    • Save the private key in it’s return JSON object

      • Save to a .pem file in current directory, with permissions 400

  • Create an t2.micro EC2 instance

    • Save the public IP address of the instance in it’s return JSON object

  • Print out the IP address of the instance, and the path to the saved .pem private key