In this project I will be adding 20 new Linux users on to a server, by creating a shell script that reads a csv file that contains the first name of the users to be onboarded.
First I will need to import onboard.sh script on to my instance.
Run the command below
scp -i ade.pem onboard.sh ubuntu@18.132.12.87:~/;
Now that the onboard.sh file was copied over successfully, I will have to update the file
Create a folder called Shell
Create the project folder called Shell
mkdir Shell
Move onboard.sh script into Shell folder
Move into the Shell folder
cd Shell
Create a csv file name names.csv
touch names.csv
Open the names.csv file
vim names.csv
Now insert 20 names into names.csv file
save and exit.
Next I'm going to create a group called Developers, add the users to that group.
Create the group by running the command
Sudo groupadd developers
Next authorize keys for each user ssh configuration
sudo chmod +x onboard.sh
Next import the users onto Linux server, create authorized-key file for each user ssh configurtion
Next step is to update current user with the public and private key.
changed to .ssh folder, create file for both public and private key.
I'm going to update the public file first
Save and Exit
Next is to update the private key
Save & exit.
Next I will need to create a public key for users to access the Linux server
vi aux-proj.pem
Now that I have created pem key called aux-proj.pem, I'm going to attempt to connect/access the Linux server using one of the user's that has been added to the server.
ssh -i aux-proj.pem Liam@13.40.183.60
I was able to successfully user Liam to access the Linux server.
END..