On Sun, Sep 15, 2013 at 02:28:15AM +0200, Jérémie Courrèges-Anglas wrote: > Jeffrey Walton <noloa...@gmail.com> writes: > > > On Sat, Sep 14, 2013 at 7:08 PM, Martin Schröder <mar...@oneiros.de> wrote: > >> 2013/9/15 Jeffrey Walton <noloa...@gmail.com>: > >>> I wanted to add myself to the sudo group. > >> > >> man sudo > > It appears to lack information on adding a user (I went through this > > man page before asking the question). > > > > Then, I went to the web and landed on an overflow page (I think its > > the 'meta' site, and not the 'stack' site). That's what took me to > > 'adduser'. > > > >> man visudo > > I don't know vi. I do known emacs, but its not on this system so I > > can't edit /etc/sudo by hand. > > To make things clear: you should always use visudo(8). It does > validation on the modified sudoers(5) file. And just like a lot of > programs, visudo(8) respects the VISUAL and EDITOR environment > variables. So you're not forced to use vi(1), the base system also > ships with ed(1) and mg(1).
Just to clarify. mg is an emacs-like editor. Every OpenBSD installation include it by default. You can run visudo with mg with this command: "EDITOR=mg visudo". > > > I tried to add emacs through pkg_add, but it appears broke. Surely > > emacs has been ported to every *nix system in existence, so its > > baffling (to me) the package manager cannot find it. > > I am the emacs package maintainer. If you encounter problems not > documented by the README, please send a mail to po...@openbsd.org, with > a full description. > > >> man adduser > > I tried `adduser jwalton sudo`, and it did not work even though the > > command looks well formed. I got the command from the overflow site. > > > >> man group > > Does not appear applicable. I want to add a user to a group, and not > > create or delete groups. > > adduser is not a standardized command, you can't expect it to behave the > same way as it does on some other OSes. Just stating a fact. > > > And 'usermod -G sudo jwalton' does not work, either. It errors with > > "Can't append group sudo for user jwalton". > > $ getent group sudo > $ # no output > > There is no group named `sudo' in the default install, though you can > add one. On the other hand, just use visudo(8) and read the bits about > the wheel group. > > > This stuff really should not be this hard... > > You're on a different OS now, some things stay the same, some change. > On the plus side the documentation is quite extensive. Manpages, the > FAQ and other pieces of information are a big concern here, so make use > of them. Have fun. > > -- > jca | PGP: 0x06A11494 / 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 > -- Juan Francisco Cantero Hurtado http://juanfra.info