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

Path /usr/local/bin missing while running sudo #10175

Closed
x86Since8088 opened this issue May 24, 2024 · 2 comments
Closed

Path /usr/local/bin missing while running sudo #10175

x86Since8088 opened this issue May 24, 2024 · 2 comments

Comments

@x86Since8088
Copy link

Environmental Info:
K3s Version:

go version go1.21.9

Node(s) CPU architecture, OS, and Version:

Linux k3s.ds.skarke.net 5.14.0-427.16.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 8 17:48:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration:

1 node fresh install

Describe the bug:

Path /usr/local/bin missing while running sudo
This is resolved by running visudo and editing this line

Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin

Add :/usr/local/bin

Steps To Reproduce:

  • added a new user
  • added user to wheel group
  • edited wheel to allow sudo without pw prompt
  • Installed K3s: on Rocky Linux
  • sudo k3s kubectl get nodes
  • the k3s command could not be found

Expected behavior:

[k3suser@k3s ~]$ sudo k3s kubectl get nodes
NAME STATUS ROLES AGE VERSION
k3s.domain.net Ready control-plane,master 3h38m v1.29.4+k3s1

Actual behavior:

the k3s command could not be found

Additional context / logs:

@x86Since8088
Copy link
Author

The install script could provide a warning and instructions to resolve.

@brandond
Copy link
Member

Validating sudo's path is somewhat outside the realm of what k3s is expected to manage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants