rancher / os2

EXPERIMENTAL: A Rancher and Kubernetes optimized immutable Linux distribution based on openSUSE
https://rancher.github.io/os2/
Apache License 2.0
82 stars 16 forks source link

creating users with cloud init not functional #14

Closed Kampe closed 1 year ago

Kampe commented 2 years ago

Hello!

I'm unable to log in with the user created, I've tried both in isolation as well with no avail. I'm using the ros-image-build with an iso output and running on a physical machine. Seems potentially related to https://github.com/rancher/os2/issues/11 https://github.com/rancher/os2/issues/10

Given this cloud-config:

#cloud-config
hostname: "ros-001"
users:
- name: "kampe"
  passwd: "password"
  groups: "users"
  ssh_authorized_keys:
  - github:kampe

ssh_authorized_keys:
  - github:kampe

runcmd:
- whoami

rancherd:
  kubernetesVersion: v1.22.2+k3s1
  rancherVersion: v2.6.0
  rancherValues:
    features: multi-cluster-management=false
    hostPort: 8443
    ingress:
      enabled: false
    noDefaultAdmin: true
    replicas: -3
    tls: external

  token: sometoken

  discovery:
    params:
      provider: "mdns"
      service: "rancher-server"
    expectedServers: 3
    serverCacheDuration: 1m
  role: cluster-init

  nodeName: ros-001
ebberholmes commented 2 years ago

I have the same problem. I am installing RancherOS2 on a vSphere VM with a config file. I am unable to login with root, user and SSH.

I have tried homedir, shell, ssh and the run_cmd workaround. How can I debug this? Can I export a debug-log from the installation process?

The version is RancherOS v0.1.0-alpha12-amd64 - Kernel 5.3.18-59.34-default (tty1)

cloud-config:

#cloud-config

hostname: "ros-001"
users:
- name: "root"
  passwd: "ros"
- name: "ebber"
  passwd: "ebber"
  homedir: "/home/ebber"
  shell: "/bin/bash"
  groups: "users"
  ssh_authorized_keys:
  - ssh-rsa AAAAB3NzaC1yc2EADAQABAAABg...= ebber@DESKTOP-Q553TMQ-wsl 

Thanks

kkaempf commented 1 year ago

Please see https://rancher.github.io/elemental/ for a successor of 'os2'.