SHARE
TWEET

Untitled

a guest Mar 19th, 2019 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Ubuntu 16.04 Template
  2. # SERV-12006 - 0C-C4-7A-55-CE-28
  3. lang en_US
  4. langsupport en_US
  5. keyboard us
  6. timezone Etc/UTC
  7. text
  8. install
  9. skipx
  10. reboot
  11.  
  12. # Distro URL
  13. url --url http://us.archive.ubuntu.com/ubuntu/ubuntu/ubuntu/ubuntu/ubuntu/
  14.  
  15. # The installer will warn about weak passwords.
  16. preseed user-setup/allow-password-weak boolean true
  17.  
  18. # The root password is generated random 64 character every time
  19. auth --useshadow --enablemd5
  20. rootpw Gym6hDeAdS3ZXg9UnCpNzJtBuM7RHW8sEkrf5xFYjVKwPqT2Q4acbv
  21. user ubuntu --fullname "Ubuntu User" --password Gym6hDeAdS3ZXg9UnCpNzJtBuM7RHW8sEkrf5xFYjVKwPqT2Q4acbv
  22.  
  23.  
  24. # System bootloader configuration
  25. bootloader --location=mbr --boot-drive=sda
  26. # Clear the Master Boot Record
  27. zerombr yes
  28. # Partition clearing information
  29. clearpart --all --initlabel --drives=sda
  30. # Disk partitioning information
  31. part /boot --fstype ext4 --size=512 --asprimary
  32. part swap --size=8192 --asprimary
  33. part / --fstype ext4 --size=10240 --asprimary --grow
  34.  
  35.  
  36.  
  37. # Network config
  38. preseed netcfg/choose_interface select auto
  39.  
  40. # Added to skip dhcp for static ip configuration
  41. preseed netcfg/disable_dhcp boolean true
  42. preseed netcfg/disable_autoconfig boolean true
  43. preseed netcfg/use_dhcp boolean false
  44. preseed netcfg/use_autoconfig boolean false
  45. preseed netcfg/get_hostname string SERV-12006
  46. preseed netcfg/get_domain string server.com
  47.  
  48. # Assign the static ip below
  49. preseed netcfg/get_ipaddress string 10.10.10.101
  50. preseed netcfg/get_netmask string 255.255.255.0
  51. preseed netcfg/get_gateway string 10.10.10.1
  52. preseed netcfg/get_nameservers string 8.8.8.8
  53. preseed netcfg/confirm_static boolean true
  54. preseed netcfg/hostname string SERV-12006
  55.  
  56. firewall --disabled
  57.  
  58. %packages
  59. ubuntu-minimal
  60. openssh-server
  61. screen
  62. curl
  63. wget
  64. rsync
  65. nano
  66. parted
  67. lshw
  68. sed
  69.  
  70. %post
  71. /bin/sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  72. wget http://10.10.10.99/key.sh
  73. sh key.sh
  74. echo 'PubkeyAcceptedKeyTypes +ssh-dss' >> /etc/ssh/sshd_config
  75.  
  76. # update fstab for the root partition
  77. perl -pi -e 's/(errors=remount-ro)/noatime,nodiratime,$1,barrier=0/' /etc/fstab
  78.  
  79. # setup locales
  80. locale-gen en_US.UTF-8
  81. update-locale LANG="en_US.UTF-8"
  82. echo 'LANG=en_US.UTF-8' >> /etc/environment
  83. echo 'LC_ALL=en_US.UTF-8' >> /etc/environment
  84.  
  85. # Clean up
  86. apt-get -qq -y autoremove
  87. apt-get clean
  88. rm -f /var/cache/apt/*cache.bin
  89. rm -rf /var/lib/apt/lists/*
  90.  
  91. %end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top