Content

                                                  Content How to create an AWS free Account? Lab 1: To launch amazon Linux EC2 instance Lab 2: To Connect to the instance from Linux client Operating System Lab 3:To Launch amazon windows instance Lab 4: Installing apache in EC2 instance Lab 5: Installing Nginx in EC2 instance Lab 6: Changing Host Name Lab 7: Creating a user and making as a sudoer Lab 8:Assigning an Elastic ip Lab 9:Creating ebs,attach and detach the volumn to the instance Lab 10:Creating an S3 Bucket and creating cross replication in another region Lab 11:Load Balancer Lab 12:Two instances with Application Load Balancer Lab 13:Launching two instances with load Balancer Lab:14 Creating Own VPC  Lab 15: Two instances which classic load Balance with own VPC Lab 16:Two instances with Application load Balancer with own VPC Lab 17: Relational Data B...

Lab 7: Creating a user and making as a sudoer

                                            Lab 7: Creating a user and making as a sudoer

Normally there are two types of users

Root user and normal user 

We can add otherthan this by following steps:
First Switch to root user

#useradd username
Eg: username devops



And now give the password to that user
#passwd devops



Give the password for that user



After that we need to the /etc/ssh/sshd_config -------------------------->To make password authentication as yes

#vi/etc/ss/sshd-config
 


you will get page like this
Go to the line 63 change password authentication from no to yes



Save and Close
Restart the sshd Service
#service restart sshd

Now exit from the server  login with user devops

#ssh devops@<ipaddress>


it will ask password

Enter the password



You have join with other than EC2-user
Now make the user as sudoer user mean as root user

Exit the session 
Login with normal user and switch to root user
Edit the sudoers file

#vi/etc/sudoers




Edit the line no 93 enter below line
Devops ALL=(ALL)       NOPASSWORD=ALL



Save and Exit
Now Exit 
Login with the devops user and switch to root user


Now switch to root user



Execrise;
Create the users in the name of jenkins and tomcat and make them as sudoer  user.

Comments

Popular posts from this blog

Lab 21:Installing docker in instance and build an image

Lab 22:Pushing a docker image to docker hub

Lab 5: Installing Nginx in EC2 instance