Open main menu

CDOT Wiki β

Changes

OPS445 Online Lab8

24 bytes added, 08:46, 20 March 2022
m
Optional Lab Exercise: Create a Fabric task called makeUser()
= Optional Lab Exercise: Create a Fabric task called makeUser() =
: 1. Study the Fabric API run(), sudo(), local(), and put() and utilize them to create a new Fabric task called makeUser()<br>: 2. The makeUser() task should perform the following on a remote machine to:
:* create a new user called "ops445p" with home directory "/home/ops445p".
:* add the new user to the sudo group called "wheel".
:* from your instructor, get the ssh public key which is posted on the internet BB to your controller workstation.:* add the ssh public key obtained from your instructor to the file named "authorized_keys" in the ~ops445p/.ssh directory on the remote machine. (Note: Make sure that you set the proper ownership and permissions on both the directory ~ops445p/.ssh (700) and the file "~ops445p/.ssh/authorized_keys.(600)):3. Add the makeUser() to your final version of fabfile.py. <br>:4. Run the new task makeUser() on your VM.<br>:5 .Verify and confirm that your new makeUser() task is working correctly.
= LAB 8 SIGN-OFF (SHOW INSTRUCTOR) =
572
edits