On 2018/02/28 16:16, Anthony Perkins wrote: > The following is a shell script to safely edit /etc/doas.conf so that you > avoid locking yourself out with a bad config. I managed to do this myself, so > thought it might be useful to a wider audience.
You can still lock yourself out with a bad doas.conf (or sudoers) edit, even with a syntactically valid config. A safer way is to keep a spare root shell open.