rSzabi

RHCE

Oct 26th, 2021
1,127
321 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  34  #ansible all -m user -a "name=ansible groups=wheel" -u root -k
  2.    35  ansible-doc user
  3.    36  ansible all -m user -a "name=ansible groups=wheel" -u root -k
  4.    37  vim inventory
  5.    38  ansible all -m user -a "name=ansible groups=wheel" -u root -k
  6.    39  ansible all -m command -a "cat /etc/shadow" -u root -k
  7.    40  #ansible all -m command -a "echo password | passwd --stdin ansible"
  8.    41  ansible all -m command -a "cat /etc/passwd | grep ansible" -u root -k
  9.    42  ansible all -m shell -a "cat /etc/passwd | grep ansible" -u root -k
  10.    43  ansible all -m shell -a "echo password | passwd --stdin ansible" -u root -k
  11.    44  ansible all -m command -a "cat /etc/shadow" -k
  12.    45  cat ansible.cfg
  13.    46  ansible all -m command -a "cat /etc/shadow" -k -K
  14.    47  ansible all -m command -a "cat /etc/shadow" -K
  15.    48  ansible all -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible' -K
  16.    49  ssh ansible1
  17.    50  ansible all -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible' -K -k
  18.    51  ansible all -m shell -a 'cat /etc/shadow' -k
  19.    52  ssh-keygen
  20.    53  ssh-copy-id ansible1
  21.    54  ssh-copy-id ansible2
  22.    55  ansible all -m shell -a 'cat /etc/shadow'
  23.  
RAW Paste Data