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

sudo testing using -l #221

Merged

Conversation

james-nesbitt
Copy link
Contributor

@james-nesbitt james-nesbitt commented Aug 19, 2024

  • previous sudo validation using sudo -n true is not really needed when there is a sudo -l option that will validate general sudo access

PRODENG-2503 sudo cleanup in launchpad
Signed-off-by: James Nesbitt jnesbitt@mirantis.com

@james-nesbitt
Copy link
Contributor Author

I won't tackle the linting defficiency with this PR.

@james-nesbitt
Copy link
Contributor Author

james-nesbitt commented Aug 19, 2024

mirantis/launchpad tested with:

    platform    = "ubuntu_22.04"
    platform    = "ubuntu_20.04"
    platform    = "rocky_8"
    platform    = "rocky_9"
    platform    = "oracle_9"
    platform    = "sles_12"
    platform    = "sles_15"

Seeing some issues with SLES at this time.

@james-nesbitt james-nesbitt marked this pull request as ready for review August 19, 2024 07:55
@kke
Copy link
Contributor

kke commented Aug 19, 2024

sudo -v will prompt for password.

Maybe sudo -n -v would work.

@james-nesbitt james-nesbitt force-pushed the PRODENG-2503-sudo-validate-update branch from 246c58a to 5101ba0 Compare August 26, 2024 09:12
@james-nesbitt
Copy link
Contributor Author

Maybe sudo -n -v would work.

I have added this to the PR, but so far I am facing a blocker with both of my SLES testing platforms. I am still investigating.

@james-nesbitt
Copy link
Contributor Author

The default sudoers setup for SLES (15) produces the following:
image

to summarize:

  1. sudo --validate : requires a password
  2. sudo -- ps : does not require a password

@james-nesbitt james-nesbitt force-pushed the PRODENG-2503-sudo-validate-update branch from 5101ba0 to 77575d0 Compare August 26, 2024 13:52
@james-nesbitt james-nesbitt changed the title sudo testing using -v sudo testing using -l Aug 26, 2024
@james-nesbitt james-nesbitt marked this pull request as draft August 26, 2024 14:12
@james-nesbitt james-nesbitt force-pushed the PRODENG-2503-sudo-validate-update branch from 77575d0 to 50a144c Compare August 27, 2024 07:31
@james-nesbitt
Copy link
Contributor Author

latest change is just to combine -n with -l

- previous sudo validation using `sudo -n true` is not really needed
  when there is a `sudo -l` option that will validate that sudo is on
  the system

PRODENG-2503 sudo cleanup in launchpad
Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
@james-nesbitt james-nesbitt force-pushed the PRODENG-2503-sudo-validate-update branch from 50a144c to c2a4999 Compare August 27, 2024 07:33
@james-nesbitt james-nesbitt marked this pull request as ready for review August 27, 2024 07:34
@kke kke merged commit 567e12c into k0sproject:release-0.x Aug 27, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants