Re: doas 101 question

2021-12-25 Thread Greg Wooledge
On Fri, Dec 24, 2021 at 08:32:14PM -0800, David Robert Newman wrote: > I asked doas author Ted Unangst about this. His reply: > > > Sorry, only very limited env replacement can be done in setenv. root's > > environment isn't available before the switch. > > Ergo, it is just as you suspected. Thi

Re: doas 101 question

2021-12-24 Thread David Robert Newman
On 12/18/21 7:08 AM, Greg Wooledge wrote: On Fri, Dec 17, 2021 at 09:20:59PM -0800, David Newman wrote: Thanks for this. I get similar results where doas shows root's PATH -- but I cannot execute a file called '/usr/local/sbin/s', which is owned by root:root and has 0750 permissions, unless I s

Re: doas 101 question

2021-12-18 Thread Greg Wooledge
On Fri, Dec 17, 2021 at 09:20:59PM -0800, David Newman wrote: > Thanks for this. I get similar results where doas shows root's PATH -- but I > cannot execute a file called '/usr/local/sbin/s', which is owned by > root:root and has 0750 permissions, unless I specify the full path: > > dnewman@coppi

Re: doas 101 question

2021-12-17 Thread Tim Woodall
On Fri, 17 Dec 2021, David Newman wrote: Thanks for this. I get similar results where doas shows root's PATH -- but I cannot execute a file called '/usr/local/sbin/s', which is owned by root:root and has 0750 permissions, unless I specify the full path: dnewman@coppi:~$ echo $PATH /usr/local/

Re: doas 101 question

2021-12-17 Thread David Newman
On 12/17/21 8:16 PM, Greg Wooledge wrote: On Fri, Dec 17, 2021 at 12:20:43PM -0800, David Newman wrote: How to configure /etc/doas.conf so a non-root user gets root's PATH? This works for me: unicorn:~$ PATH=/usr/local/bin:/usr/bin:/bin unicorn:~$ cat /etc/doas.conf permit setenv { PATH=/us

Re: doas 101 question

2021-12-17 Thread Greg Wooledge
On Fri, Dec 17, 2021 at 12:20:43PM -0800, David Newman wrote: > How to configure /etc/doas.conf so a non-root user gets root's PATH? This works for me: unicorn:~$ PATH=/usr/local/bin:/usr/bin:/bin unicorn:~$ cat /etc/doas.conf permit setenv { PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi

doas 101 question

2021-12-17 Thread David Newman
bullseye 11.1, 5.10.0-9-amd64, doas 6.8.1-2 How to configure /etc/doas.conf so a non-root user gets root's PATH? Neither of these options work when attempting to execute a command in /usr/sbin via doas (e.g., 'doas '): permit nopass setenv { PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr