Re: doas and */sbin/* commands
"TR Kellers, Sr" <[email protected]>
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <[email protected]> |
> On Feb 26, 2026, at 5:32 PM, [email protected] wrote: > > On Thu, Feb 26, 2026 at 04:28:00PM -0500, TR Kellers, Sr wrote: > >>> 2+0 ~$ doas printenv >>> DOAS_USER=itz >>> HOME=/root >>> LOGNAME=root >>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin >>> SHELL=/bin/sh >>> TERM=alacritty >>> USER=root >>> 3+0 ~$ doas which service >>> /usr/sbin/service >>> 4+0 ~$ doas service >>> doas: service: command not found > >> Mine shows this, what does your doas.conf contain? > >> timothyk@nexttroll:~ % doas printenv >> DOAS_USER=timothyk >> HOME=/root >> LOGNAME=root >> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin >> SHELL=/bin/sh >> TERM=xterm-256color >> USER=root >> timothyk@nexttroll:~ % doas which service >> /usr/sbin/service >> timothyk@nexttroll:~ % doas service > >> Usage: >> service [-j <jail name or id>] -e >> service [-j <jail name or id>] [-q] -R >> service [-j <jail name or id>] [-v] -l >> service [-j <jail name or id>] [-v] -r >> service [-j <jail name or id>] [-dqv] [-E var=value] <rc.d script> start|stop|etc. >> service -h > > My doas.conf is, in full: > > permit nopasswd :wheel > > but I don't see how that is relevant? > > One difference I see is my unprivileged shell is bash and yours seems > to be tcsh. But even that, how should it matter? Once doas is in > control, everything ought to be the same or it's a bug :-P > > -- > Ian > I switched my shell to bash and it still works as above for me. I asked about doas.conf in case there was something crazy or corrupted in there, but yours as listed is the same as mine. Just in case there is some OS version difference, this is my uname: [timothyk@nexttroll ~]$ uname -a -K -U FreeBSD nexttroll.com 16.0-CURRENT FreeBSD 16.0-CURRENT #0 main-102fed041d7f-dirty: Fri Feb 20 21:10:39 EST 2026 [email protected]:/usr/obj/usr/src/amd64.amd64/sys/FEB20 amd64 1600012 1600012