Skip to content

Use more expressive error messages when failing out in visudo#1157

Merged
squell merged 1 commit intotrifectatechfoundation:mainfrom
sohomdatta1:bttr-error-messages
Jun 12, 2025
Merged

Use more expressive error messages when failing out in visudo#1157
squell merged 1 commit intotrifectatechfoundation:mainfrom
sohomdatta1:bttr-error-messages

Conversation

@sohomdatta1
Copy link
Copy Markdown
Contributor

Old error message:

visudo: Permission denied (os error 13)

Newer error message:

visudo: Failed to open existing sudoers file at "/etc/sudoers": Permission denied (os error 13)

(etc)

Old error message:
```
visudo: Permission denied (os error 13)
```

Newer error message:
```
visudo: Failed to open existing sudoers file at "/etc/sudoers": Permission denied (os error 13)
```

(etc)

Signed-off-by: Sohom <sdatta4@ncsu.edu>
@sohomdatta1
Copy link
Copy Markdown
Contributor Author

sohomdatta1 commented Jun 11, 2025

Retroactively filling this out since Github didn't freakin prompt me :(

Pull Request Checklist

(#835 was the closest I could find, but I also assumed that this would be considered a small change under the Contributing guidelines)

@squell
Copy link
Copy Markdown
Member

squell commented Jun 12, 2025

#835 is the relevant issue---improving the error message you quoted was the prime objective.

To fully close #835 we might want to look at error messages in case PAM is misconfigured (e.g. no PAM profile can be loaded due to a missing /etc/pam.d/sudo and no 'default')

note: We currently don't use PR templates; it's appreciated that you took the time to use the checklist, but it's not a hard requirement on this repository. I have some reservations about forcing people to "tick boxes". For example, the 'code of conduct' is not a "contract" you have to "accept", it's simply something we expect. Some of the other things are checked in CI or code review.

@squell
Copy link
Copy Markdown
Member

squell commented Jun 12, 2025

Thanks for your contribution!

@squell squell merged commit 5edb66d into trifectatechfoundation:main Jun 12, 2025
15 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