Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with non root user #2298

Open
Tom-abc opened this issue Sep 7, 2023 · 1 comment
Open

problem with non root user #2298

Tom-abc opened this issue Sep 7, 2023 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Tom-abc
Copy link

Tom-abc commented Sep 7, 2023

What happen?

i'm trying to install k8s. if i let --user be root everything goes well, however if i let user be non root the process will fail, and su doesn't solve the problem

Relevant log output?

[ERROR] [root.go:75] sealer-v0.11.0: failed to detect rootfs cache /var/lib/sealer/data/my-cluster/rootfs/cache/image/1e08f61a9b71299e05ede5884a96e0e15c4554b6974432960e73ddafabfc3074 on host 192.168.195.22: failed to new sftp client of host(192.168.195.22): failed to execute cmd(sudo grep -oP "Subsystem\s+sftp\s+\K.*" /etc/ssh/sshd_config): Process exited with status 1

What you expected to happen?

success

How to reproduce it (as minimally and precisely as possible)?

sudo sealer run docker.io/sealerio/kubernetes:v1-22-15-sealerio-2 --masters 192.168.195.22 -u user -p passwd

Anything else we need to know?

No response

What is the version of Sealer you using?

0.11.0

What is your OS environment?

Ubuntu 22.04.2 LTS

What is the Kernel version?

Linux 5.15.90.1-microsoft-standard-WSL2

Other environment you want to tell us?

No response

@Tom-abc Tom-abc added the kind/bug Something isn't working label Sep 7, 2023
@Tom-abc
Copy link
Author

Tom-abc commented Sep 8, 2023

it seems that sudo requires the password which is not provided.

cmd = `sudo grep -oP "Subsystem\s+sftp\s+\K.*" /etc/ssh/sshd_config`

maybe echo password | sudo -S ... is an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant