yogan-ntier

LxcProfile-Yogan

Jul 27th, 2021
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. config:
  2. boot.autostart: "false"
  3. security.nesting: "true"
  4. security.privileged: "true"
  5. environment.DISPLAY: :0
  6. user.user-data: |
  7. #cloud-config
  8. users:
  9. - name: yogan
  10. ssh_authorized_keys:
  11. - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDtXft3O2stRlBSs581TY5S1pDOyNytieqXzJdWaF5DhVokBDF0bjNLTFf5dIoLstwF4fSRmKahjgiIctVYYT0RgSoY1e+u2JTl3An2Umvt44D7UVhzAE6RhCMz09rfsae3pWcEKnT/9pq0vIwxkCd+jvw6StsBVhka9XCwXZ2raYerhxdIDHMbHaKkiYYzGiIUyiflR6rkjvtHgyoaUhKeQJjM2oV7TUoEFAYGpnVOQxAPdjmtVtiWOWCLFRn8MHGfyYy4SRMP+Z46LOIac5RAWRnTlvGSMgnvQBV0XngeDpN8hD7zW19CsDi3v2V1ztyDwZPXpmKMZwTB4a5KdBW8ssQBcV9rDjiq/XdRwYEwiqFOqel7iXrIOn1LiruTBh4NvHbyOpITAj52JmNNQvaKE421G1OTrFMyIXU+FrOXChBQ8v90+TiLhJss8Sv3Qg+Ch4kjxTavTdMS02CCoGeMO+AqeOP11LwVANliPTBQLxLR++18fv4ugCwSUHYrnfz8fjwOejT1GShIj/0YGFsESKpjhNx2jO0EBr23gcMYLWdN7NQpcsSLKayrvneiz+WXdWXE2EZnoF+13XE5zD3pNIa+lRHdPHU2wxx9vw63i9aNPy51eyrktkIskQuuECtS/VypdSRFF53bS1rDdBMnMf5ndMuJvJsk1UxtkFoxtQ== [email protected]
  12. sudo: ['ALL=(ALL) NOPASSWD:ALL']
  13. groups: [root,sudo,staff]
  14. shell: /bin/bash
  15. disable_root: false
  16. network:
  17. version: 1
  18. config:
  19. - type: physical
  20. name: eth0
  21. subnets:
  22. - type: dhcp
  23. runcmd:
  24. - pkill snapd
  25. - systemctl stop unattended-upgrades
  26. - systemctl stop systemd-remount-fs
  27. - system reset-failed
  28. - passwd -d root
  29. - passwd -d yogan
  30. - echo "debconf debconf/priority select low" | sudo debconf-set-selections
  31. - DEBIAN_FRONTEND=noninteractive dpkg-reconfigure debconf
  32. - DEBIAN_FRONTEND=noninteractive apt-get update -y
  33. - DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
  34. - DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
  35. - DEBIAN_FRONTEND=noninteractive apt-get autoclean -y
  36. - rm -rf /root/.bashrc /root/.gnupg /root/.profile /root/.ssh/
  37. - cp -rfp /home/yogan/Downloads/.ssh /root/.ssh
  38. - chown -R root:root /root/.ssh
  39. - cp /home/yogan/Downloads/.bashrc /root/.bashrc
  40. - cp /home/yogan/Downloads/.bashrc /home/yogan/.bashrc
  41. - cp /home/yogan/Downloads/.profile /root/.bash_profile
  42. - cp /home/yogan/Downloads/.profile /home/yogan/.bash_profile
  43. - cp /home/yogan/Downloads/.profile /root/.profile
  44. - cp /home/yogan/Downloads/.profile /home/yogan/.profile
  45. - chown -R yogan:yogan /home/yogan
  46. - 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
  47. - 'echo export PULSE_SERVER=unix:/tmp/.pulse-native | tee --append /home/yogan/.profile'
  48. - 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
  49. timezone: Africa/Johannesburg
  50. packages:
  51. - man
  52. - manpages
  53. - hello
  54. - locales
  55. - less
  56. - vim
  57. - nano
  58. - jq
  59. - uuid
  60. - bash-completion
  61. - sudo
  62. - rsync
  63. - bridge-utils
  64. - net-tools
  65. - vlan
  66. - ncurses-term
  67. - iputils-arping
  68. - iputils-ping
  69. - iputils-tracepath
  70. - traceroute
  71. - mtr-tiny
  72. - tcpdump
  73. - dnsutils
  74. - ssh-import-id
  75. - openssh-server
  76. - openssh-client
  77. - software-properties-common
  78. - x11-apps
  79. - mesa-utils
  80. - pulseaudio
  81. power_state:
  82. delay: 'now'
  83. mode: reboot
  84. timeout: 10
  85. condition: True
  86. final_message: "The system is finally up! Enjoy!"
  87. write_files:
  88. - path: /etc/ssh/sshd_config
  89. content: |
  90. Port 22
  91. AddressFamily any
  92. SyslogFacility AUTH
  93. LogLevel INFO
  94. PermitRootLogin yes
  95. PubkeyAuthentication yes
  96. PasswordAuthentication yes
  97. ChallengeResponseAuthentication no
  98. GSSAPIAuthentication no
  99. HostbasedAuthentication no
  100. PermitEmptyPasswords no
  101. UsePAM yes
  102. IgnoreUserKnownHosts yes
  103. IgnoreRhosts yes
  104. X11Forwarding yes
  105. X11DisplayOffset 10
  106. X11UseLocalhost yes
  107. PermitTTY yes
  108. PrintMotd no
  109. TCPKeepAlive yes
  110. PermitTunnel yes
  111. ClientAliveInterval 5
  112. Banner none
  113. AcceptEnv LANG LC_* EDITOR PAGER SYSTEMD_EDITOR
  114. Subsystem sftp /usr/lib/openssh/sftp-server
  115. - path: /etc/ssh/ssh_config
  116. content: |
  117. Host *
  118. ForwardAgent no
  119. ForwardX11 yes
  120. PasswordAuthentication yes
  121. CheckHostIP no
  122. AddressFamily any
  123. SendEnv LANG LC_* EDITOR PAGER
  124. StrictHostKeyChecking no
  125. HashKnownHosts yes
  126. ServerAliveInterval 5
  127. - path: /etc/sudoers
  128. content: |
  129. Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
  130. Defaults env_keep += "HOME EDITOR SYSTEMD_EDITOR PAGER"
  131. Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
  132. Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  133. Defaults logfile=/var/log/sudo.log,loglinelen=0
  134. Defaults !syslog, !pam_session
  135. root ALL=(ALL) NOPASSWD: ALL
  136. %wheel ALL=(ALL) NOPASSWD: ALL
  137. %sudo ALL=(ALL) NOPASSWD: ALL
  138. yogan ALL=(ALL) NOPASSWD: ALL
  139. description: default
  140. devices:
  141. lxdbr0:
  142. nictype: bridged
  143. parent: lxdbr0
  144. type: nic
  145. Downloadsdir:
  146. path: /home/yogan/Downloads
  147. source: /home/yogan/Downloads
  148. type: disk
  149. Sourcedir:
  150. path: /home/yogan/sources
  151. source: /home/yogan/MEGA/sources
  152. type: disk
  153. root:
  154. path: /
  155. pool: default
  156. type: disk
  157. PASocket1:
  158. bind: container
  159. connect: unix:/run/user/1000/pulse/native
  160. listen: unix:/home/yogan/pulse-native
  161. security.gid: "1000"
  162. security.uid: "1000"
  163. uid: "1000"
  164. gid: "1000"
  165. mode: "0777"
  166. type: proxy
  167. X0:
  168. bind: container
  169. connect: unix:@/tmp/.X11-unix/X0
  170. listen: unix:@/tmp/.X11-unix/X0
  171. security.gid: "1000"
  172. security.uid: "1000"
  173. type: proxy
  174. mygpu:
  175. type: gpu
  176. name: default
  177. used_by: []
Advertisement
Add Comment
Please, Sign In to add comment