Saltstack Official IPTables Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
715B

  1. #!/bin/bash -xe
  2. # Speedup reverse hostname lookup
  3. sed -i "s/127.0.0.1.*/127.0.0.1 localhost $(hostname)/" /etc/hosts
  4. # Enabling password auth for kitchen user
  5. sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
  6. # Disable sshd NS lookups
  7. echo "UseDNS no" >> /etc/ssh/sshd_config
  8. service ssh restart
  9. # Create user 'kitchen' with password 'kitchen'
  10. useradd -m -G adm,sudo -p '$6$DqOdqb/l$hOpDWFPeC8/45Oo8NbqZyqLZxYd.Vtlujf9A4OdwUKgBjRcETuc9Gd2C7OyI99MY2N/pACrbV8WymqV.H1XZ1.' -s /bin/bash kitchen
  11. # Passwordless sudo for user 'kitchen'
  12. echo "kitchen ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-kitchen
  13. # Secure kitchen home
  14. chown kitchen:root /home/kitchen -R
  15. chmod 0700 /home/kitchen