JamesTurland / JimsGarage

Homelab Goodies
2.16k stars 482 forks source link

K3sup script fail requiring a password. #19

Closed Sivivatu closed 1 year ago

Sivivatu commented 1 year ago

I am testing the install script but using unraid as the hypervisor rather than proxmox. AFAIK this should make a difference, it just changes the creation of the base vms.

The issue I'm seeing is:

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

This is returned when the install part of the script runs (ie # Step 1: Bootstrap First k3s Node). Looking at the issue here it appears that sudo is a requirement for K3sup. this would mean the script shouldn't work, but it obviously does. what am I missing?

JamesTurland commented 1 year ago

Are you using certificate based authentication for SSH or standard passwords? You should use certificates for this script (AKA keys).

kasdk3 commented 1 year ago

cloud-init on Proxmox sets ssh NOPASSWD in /etc/sudoers.d/. This is needed for the script to run without asking for the password. You also need to setup the certificate based authentication for SSH

WARNING doing this will disable the sudo password for the user.

Sivivatu commented 1 year ago

That makes sense. I'm not running on proxmox so didn't use the cloud-init process. Will try this