Doas Mastery (2016)
flak.tedunangst.com
flak.tedunangst.com
-Ehm, I try to `sudo X` and it says command not found
-Yup, that's by design. Try `doas X`
-Well, I tried sudo again and it just doesn't work. What is the root password? I need this, like, an hour ago. Do the needfull!!1!
-Sure, have your manager call me...
And I guess I can't really blame them. Their mental modal is: I need to run `sudo X`. Because, well, that's what the runbook-they-got-from-their-previous-job, Google, or ChatGPT says.
The response they get does not get them any nearer to being able to run `sudo X`. So, they get angry, and push back. Unless you can get someone to sit down, reflect, and think about what they really want to achieve, this is a situation that is very hard to resolve.
So, that's one more reason I love `doas`: it leads to, eh, valuable conversations.
And you're replying to someone who has. Life is funny like that.
* https://github.com/Duncaen/OpenDoas/issues/116#issuecomment-...
On their first day, I was helping them set up their laptop:
- You need to run `sudo X`
- types `X-but-misspelled`
- No, that's `sudo`, then `X`
- types `sudo_X-but-misspelled` (literally `sudo`-underscore-`misspelled version of X`)
- I mean, with a space after `sudo`, like using sudo to run X.
- types `sudo_X`
- Have you used sudo?
- Finally types `sudo X`.
I saved a screenshot of our zoom so I could show our mutual boss later. They ghosted us after a week.
Huh. A Unix security engineer who doesn't have sudo (or presumably doas) in muscle memory? Interesting.
Doas mastery - https://news.ycombinator.com/item?id=12429050 - Sept 2016 (15 comments)
http://man.openbsd.org/tty.4#TIOCSETVERAUTH
A post I found on the rational behind this mechanism.
https://marc.info/?l=openbsd-misc&m=150032397404966&w=2
edit: I was looking at the opendoas project and it does something with the persist option, still reading the code but it looks like it sets some sort of timestamp on file descriptor 0. update: found it, here is the timestamp code. probably a user space version of what openbsd doas does in the kernel.
https://github.com/Duncaen/OpenDoas/blob/master/timestamp.c
So linux doas is trying to do something. Note that per that mail post I found doas auth persist has a different scope than sudo auth persist. this can have implications in a scripted environment.
To which I add that it is important not to conflate Jesse Smith's doas, the portable doas that has code for different operating systems including OpenBSD, with Duncan Overbruck's OpenDoas, the "open" doas that is tied to Linux has has had the code for other operating systems removed and mechanisms copied in from sudo for things like timeout flag files.