The document provides a comprehensive guide on using Ansible for user and package management, including commands for creating, deleting, and checking users, as well as installing packages like httpd. It also covers file management tasks such as creating files and directories, and demonstrates privilege escalation methods. Additionally, it includes instructions for creating and executing a playbook to automate user creation.
The document provides a comprehensive guide on using Ansible for user and package management, including commands for creating, deleting, and checking users, as well as installing packages like httpd. It also covers file management tasks such as creating files and directories, and demonstrates privilege escalation methods. Additionally, it includes instructions for creating and executing a playbook to automate user creation.
ansible all -m user -a "name=daksh uid=1007 groups=mishu shell=/sbin/no
- name=daksh: Username - uid=1007: User ID - groups=mishu: Primary group - shell=/sbin/nologin/: No login shell - state=present: Ensures the user is present