Skip to content

Instantly share code, notes, and snippets.

@versionsix
Last active April 18, 2024 10:57
Show Gist options
  • Save versionsix/d3d7684305fe6f435ee988ee979d004a to your computer and use it in GitHub Desktop.
Save versionsix/d3d7684305fe6f435ee988ee979d004a to your computer and use it in GitHub Desktop.
[Cloud-Init] User-Data for auto root login
%YAML 1.2
---
#cloud-config
disable_root: false
ssh_pwauth: True
chpasswd:
list: |
root:toor
expire: False
users:
- default
- name: user
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: False
plain_text_passwd: 'unlimited750'
write_files:
- path: /etc/issue
permissions: '0644'
content: |
\S
Kernel \r on an \m
IPv4: \4 IPv6: \6
- path: /etc/systemd/system/[email protected]/override.conf
permissions: '0644'
content: |
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
runcmd:
- [ /bin/systemctl, daemon-reload ]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment