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

Is there currently a version of sealos that supports deployment by non-root users? #4505

Open
1473371932 opened this issue Jan 24, 2024 · 10 comments
Labels
kind/feature New feature or request response-expired

Comments

@1473371932
Copy link

What is the problem this feature will solve?

如题,或者说目前所有版本都不支持呢?我在 Changlog 中没有找到对应内容

If you have solution,please describe it

No response

What alternatives have you considered?

No response

@1473371932 1473371932 added the kind/feature New feature or request label Jan 24, 2024
@sealos-ci-robot sealos-ci-robot changed the title 目前 sealos 有版本支持非 root 用户部署么? Is there currently a version of sealos that supports deployment by non-root users? Jan 24, 2024
@luanshaotong
Copy link
Member

据我所知,没有。这个功能非常少见,并且不够明确。你希望的non-root是指ssh连接用户是非root,还是指用户不能切换为root,还是指当前用户连sudo权限都没有?在我看来没有sudo权限是无法安装的,因为涉及更改多个系统相关的配置。不能切换为root用户但具备sudo权限是很奇怪的需求,至少我没有想到使用场景。非root用户ssh是可实现的,我曾经写过类似的脚本,在其他的k8s发行版中。不过不清楚sealos是否支持这种小众需求。

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As far as I know, no. This feature is very rare and unclear. The non-root you want means that the ssh connection user is non-root, or that the user cannot switch to root, or that the current user does not even have sudo permissions? In my opinion, it is impossible to install without sudo permissions because it involves changing multiple system-related configurations. Not being able to switch to the root user but having sudo permissions is a very strange requirement, at least I didn't think of the usage scenario. Non-root user ssh is achievable, I have written similar scripts in other k8s distributions. However, it is unclear whether sealos supports this niche demand.

@geyaandy
Copy link

据我所知,没有。这个功能非常少见,并且不够明确。你希望的non-root是指ssh连接用户是非root,还是指用户不能切换为root,还是指当前用户连sudo权限都没有?在我看来没有sudo权限是无法安装的,因为涉及更改多个系统相关的配置。不能切换为root用户但具备sudo权限是很奇怪的需求,至少我没有想到使用场景。非root用户ssh是可实现的,我曾经写过类似的脚本,在其他的k8s发行版中。不过不清楚sealos是否支持这种小众需求。

我这边有个类似需求,目前生产主机都是不用用root直接登录的,必须用非root用户(此用户可以有sudo权限)登录后切到root,这种情况sealos安装的时候指定了此用户(有sudo权限)但是会安装失败( #4324),使用root用户就没有此问题,不知道这是否是4.3.7版本的一个bug

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As far as I know, no. This feature is very rare and unclear. The non-root you want means that the ssh connection user is non-root, or that the user cannot switch to root, or that the current user does not even have sudo permissions? In my opinion, it is impossible to install without sudo permissions because it involves changing multiple system-related configurations. Not being able to switch to the root user but having sudo permissions is a very strange requirement, at least I didn't think of the usage scenario. Non-root user ssh is achievable, I have written similar scripts in other k8s distributions. However, it is unclear whether sealos supports this niche demand.

I have a similar need here. Currently, production hosts do not need to be logged in directly with root. You must log in with a non-root user (this user can have sudo permissions) and then switch to root. In this case, this user is specified when sealos is installed. (with sudo permissions) but the installation will fail (#4324). This problem does not occur when using the root user. I don’t know if this is a bug in version 4.3.7.

@Maple1401
Copy link

需求+1

生产都是非 root 用户登录,登录后可sudo 或 su - root, 希望尽快支持普通用户 ssh ,再切换 root 部署的方式。

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Demand +1

In production, non-root users are logged in. After logging in, you can use sudo or su - root. We hope to support ordinary users ssh as soon as possible, and then switch to the root deployment method.

@fengxsong
Copy link
Collaborator

As far as I know it's already supported. you can run sealos command without root/sudo privileges(but certain requirements must be met such as uidmap and fuse-overlayfs) and use any user with sudo privileges as the user for remote ssh connections to create a new cluster.

@1473371932 @Maple1401 @geyaandy

@luanshaotong
Copy link
Member

As far as I know it's already supported. you can run sealos command without root/sudo privileges(but certain requirements must be met such as uidmap and fuse-overlayfs) and use any user with sudo privileges as the user for remote ssh connections to create a new cluster.

@1473371932 @Maple1401 @geyaandy

@fengxsong 是不是指直接修改clusterfile中的ssh字段?https://sealos.io/docs/self-hosting/lifecycle-management/reference/sealos/commands/apply

@fengxsong
Copy link
Collaborator

As far as I know it's already supported. you can run sealos command without root/sudo privileges(but certain requirements must be met such as uidmap and fuse-overlayfs) and use any user with sudo privileges as the user for remote ssh connections to create a new cluster.
@1473371932 @Maple1401 @geyaandy

@fengxsong 是不是指直接修改clusterfile中的ssh字段?https://sealos.io/docs/self-hosting/lifecycle-management/reference/sealos/commands/apply

yes.

Copy link

stale bot commented May 3, 2024

This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request response-expired
Projects
None yet
Development

No branches or pull requests

6 participants