Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

automate-user

Automate user creation on linux server using ansible

Login to your AWS and update your terminal

run "sudo apt update " Screenshot 2025-09-24 at 9 59 56 pm

run this command "sudo apt install ansible -y

Screenshot 2025-09-24 at 10 01 05 pm

ansible -version

Screenshot 2025-09-24 at 10 02 04 pm

ssh-keygen -t rsa

Screenshot 2025-09-24 at 10 02 39 pm

open a file "nano inventory.ini"

Screenshot 2025-09-24 at 10 55 22 pm ### create a file called "playbook.yml" and put in the files Screenshot 2025-09-25 at 3 20 21 pm

Open the file with nano playbook.yml

Screenshot 2025-09-25 at 3 21 13 pm

after that run the two server together ansible-playbook -i inventory.ini create_users.yml

Screenshot 2025-09-25 at 3 23 49 pm

to verify the user created on the target sever run " cat /etc/passwd

ls /home"

Screenshot 2025-09-25 at 3 30 24 pm

to test the SSH access ssh user1@

ssh user2@

Screenshot 2025-09-25 at 3 25 02 pm

About

Automate user creation on linux server using ansible

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors