-A is ask for password, and not add a user to the sudoer's group. It appears none of -AknS adds a user to the group.
How do we add a user to the sudoer's group?
Okay, so the first thing is, there is no "sudoers group". (Well, not a default/dedicated one anyway, though it is actually common to configure %wheel or %staff as such a group.)
And if there were, you'd use usermod
on OpenBSD (or gpasswd
on Linux) – it's just a regular group modified using regular tools, there is nothing very sudo-ish about it.
The second thing is, sudoedit is not for modifying groups, it's for editing /etc/sudoers.
The manual pages tell you not to edit /etc/sudoers directly. But editing /etc/sudoers is exactly how you give sudo access to someone (whether a user or a %group).
The only difference is that sudoedit
performs syntax checks on the edited file, so that you don't accidentally lock out all administrators because of a typo, and makes sure two people aren't editing the same sudoers file at the same time.. Regular vi /etc/sudoers
wouldn't have such safeguards.
So the instructions remain the same. Run sudoedit
– just sudoedit
– and add your username or chosen group to the sudoers file.