Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

RancherOS default password? #2842

Closed
t3pfaffe opened this issue Jul 22, 2019 · 10 comments
Closed

RancherOS default password? #2842

t3pfaffe opened this issue Jul 22, 2019 · 10 comments

Comments

@t3pfaffe
Copy link

RancherOS Version:1.53

Where are you running RancherOS? Proxmox

So I installed RancherOS to disk from ISO. This iso previously had auto-login set up by default. I proceeded to then remove the ISO and boot to the disk. The problem I ran into is that there is no way to login. For some reason they did not find reason to document this but according to issues on RancherOS's public repo they say that just using rancher and then entering nothing will work. It doesnt. The password I set during install from ISO does not work either. What am I supposed to do here? No default password is mentioned anywhere but github issues. The only thing I keep hearing is to set it up to autlogin by default when you instal it from the ISO but that I can not believe that would be best practice. They also recomend setting SSH private keys so you can get back in but that still would not help because setting the password of a user requires the user's previous password. And both of these definitely do not help me now anyway since I am already installed.

@niusmallnan
Copy link
Contributor

ROS doesn't have a default password, we recommend using the ssh key.

If you still want to use a password, you can set it via kernel boot param:
https://rancher.com/docs/os/v1.x/en/installation/configuration/adding-kernel-parameters/#user-password

@t3pfaffe
Copy link
Author

So then why does it ask for a password? Even using the kernel parameters it still does not log in. Why does ROS ask for a password to a user that does not exist? How is that even possible in linux? How can you set a user to have no password and cant even be logged in?

@t3pfaffe
Copy link
Author

This is the entirety of my clould-config.yml

#cloud-config

hostname: compute1_rancheros

rancher: 
  network:
    interfaces:
      eth0:
	address: 10.0.0.121/24
	gateway: 10.0.0.1
	mtu: 1500
	dhcp: false
    dns:
      nameservers:
      - 1.1.1.1
      - 8.8.4.4

ssh_authorized_keys:
  - ssh-rsa <redacted>== RancherOSKey

The device is also now unreachable by that IP address after my multiple reinstalls becuase of this problem. So I can not SSH into it. What am I supposed to do? If I set the ip address when isntalling from ISO the ip address works. When I install and remove the iso media the ip doesnt. How does this make any sense. The config has not syntax errors and the hostname is applied correctly so i know it is reading the cloud-config.yml . All of this could be avoided by not creating a user that is impossible to log into.

@fam4r
Copy link

fam4r commented Dec 3, 2019

Same thing here, just used the proxmox-dedicated iso on my PVE node (FYI 1GB is not enough, reference).

The ISO boot performs autologin as rancher as reported here.

Then I try to login via SSH (to write/copy my cloud-config.yml file) but I get asked for a password.

What's the correct way to send the cloud-config.yml file since both SSH and PVE clipboard does not work?

@OffCorner
Copy link

Same thing here, just used the proxmox-dedicated iso on my PVE node (FYI 1GB is not enough, reference).

The ISO boot performs autologin as rancher as reported here.

Then I try to login via SSH (to write/copy my cloud-config.yml file) but I get asked for a password.

What's the correct way to send the cloud-config.yml file since both SSH and PVE clipboard does not work?

same issue here

@KillSwitchIO
Copy link

This guide worked for me: https://linuxhint.com/install_rancher_os/
Specifically sudo passwd rancher

@dld2517
Copy link

dld2517 commented Aug 16, 2020

If you set it up using an SSH key, the password will be the key password that you created when you made the key file using ssh-keygen.

@raugustinus
Copy link

To add a hint to @KillSwitchIO's guide link. You can provide the cloud-config.yml file like so for instance :

sudo ros install -c https://link/to/cloud-config.yml

@524c
Copy link

524c commented Jan 27, 2023

I'm trying to start testing with a freshly installed Rancher Os, but the struggle now is figuring out how to login to the shell.
Think: you've just installed it and there's a prompt in front of you to enter your username and password... I only see useless procedures talking about how to set a password. Jesus... this could be simplified in N ways... 😩

@524c
Copy link

524c commented Jan 27, 2023

So then why does it ask for a password? Even using the kernel parameters it still does not log in. Why does ROS ask for a password to a user that does not exist? How is that even possible in linux? How can you set a user to have no password and cant even be logged in?

There are many ways to make it difficult and to make it simple. It seems that around here they prefer to do it the hardest way possible. The maintainers might think this conveys a sense of security, but it really isn't...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants