Open TornaxO7 opened 7 months ago
Some examples for users interested in this issue: https://askubuntu.com/questions/837558/where-are-sudos-insults-stored
I've asked ChatGPT (which I'm not a fan of otherwise) to come up with some insults.
I think these are all funnier than the original ones, so I'm already not convinced of having those in sudo-rs.
Secondary, insults
also doesn't really mesh will with our 'design principles': https://github.com/trifectatechfoundation/sudo-rs/blob/main/CONTRIBUTING.md
However!
I started thinking: why just sudo? Why shouldn't users also be insulted when they mistype their password in say, GDM
or login
? And that gave me rise to the following logical solution where we won't have to add this to sudo-rs, yet everybody can have the insults they deserve.
Let's make a pam_insult
module.
I started thinking: why just sudo? Why shouldn't users also be insulted when they mistype their password in say, GDM or login? And that gave me rise to the following logical solution where we won't have to add this to sudo-rs, yet everybody can have the insults they deserve.
Not gonna lie, that would be even funnier, I think :D
Hacked together this idea using pam_exec
, seems to work:
$ sudo ls
[sudo: authenticate] Password:
[sudo] Did you forget your password or just your brain?
Note that this even looks like it's sudo-rs that's doing the insulting. ;)
And also:
$ login <username>
Password:
You're like a broken record, but instead of music, it's the sound of failure.
Login incorrect
Of course this behaviour can be restricted to just sudo
by putting the appropriate lines not in /etc/pam.d/common-auth
but in /etc/pam.d/sudo
and /etc/pam.d/sudo-i
.
According to the wontfix
label, this means that the insulting feature won't be added and I have to apply the changes by myself? So I have to close this issue?
I think the PAM module prototype (it's on GitHub if you know where to look) shows that we can achieve the same functionality without modifying the source code, which I'm sure most people will agree is better than adding it inside the setuid code base.
But given the enthusiastic response this issue got, we should probably address this issue in documentation (such as a FAQ), or squelch the parse error if Defaults insults
is encountered, so I'd prefer to keep it upon until we've decided how best to address this.
Describe the feature you'd like see implemented in
sudo-rs
In generalsudo
, you can putDefaults insults
to get insulted, if you mistyped your password but this doesn't seem to be existing insudo-rs
.What problem can be solved with this feature? Less laughs.
Describe alternatives you've considered Using
sudo
instead ofsudo-rs
.Additional context