Debian では bullseye 以降でpkg がある
$ git clone https://github.com/slicer69/doas $ cd doas/ $ make $ fakeroot checkinstall --install=no $ sudo dpkg -i ./doas_20191225-1_amd64.deb
$ git clone https://github.com/slicer69/doas $ cd doas/ $ make cc -Wall -O2 -DUSE_PAM -DDOAS_CONF=\"/usr/local/etc/doas.conf\" -D_GNU_SOURCE -include compat/compat.h -Icompat -c -o doas.o doas.c doas.c:48:10: fatal error: security/pam_appl.h: No such file or directory 48 | #include <security/pam_appl.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [<builtin>: doas.o] Error 1 $ apt-file search security/pam_appl.h libpam0g-dev: /usr/include/security/pam_appl.h $ sudo apt install libpam0g-dev $ make $ fakeroot checkinstall --fstrans --install=no $ sudo dpkg -i ./doas_20191225-1_amd64.deb
$ git clone https://github.com/slicer69/doas $ cd doas/ $ make yacc parse.y make: yacc: Command not found make: *** [Makefile:55: y.tab.o] Error 127 $ sudo apt install bison $ make $ fakeroot checkinstall --install=no $ sudo dpkg -i ./doas_20191225-1_armhf.deb
/usr/local/etc/doas.conf
$ sudo install -o root -g root -m 600 /dev/null /usr/local/etc/doas.conf $ sudo vi /usr/local/etc/doas.conf
alice
アカウントユーザがroot権であらゆるコマンドを実行できる.パスワードは alice
のものを入力する.
permit alice
wheell
グループのユーザがroot権であらゆるコマンドを実行できる.パスワードは実行したユーザのものを入力する.
permit :wheel
wheel
グループのユーザがパスワード無しでroot権であらゆるコマンドを実行できる
permit :wheel permit nopass keepenv root
persist
で認証が成功してからパスワードが5分間求められなくなる.
permit persist :wheel
doas: invalid option -- 'xxx'
以下のようにコマンドの前に --
を入れると良さそう
$ doas -- command option
$ man doas | grep '\ \-\-' -A1 -- Any dashes after a combined double dash (--) will be interpreted as part of the command to be run or its paramters. Not an argument passed to doas itself.
コメント