Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #243227

Re: doas 101 question

From Tim Woodall <debianuser@woodall.me.uk>
Newsgroups linux.debian.user
Subject Re: doas 101 question
Date 2021-12-18 08:00 +0100
Message-ID <DvBRg-55D-3@gated-at.bofh.it> (permalink)
References <Dvsbf-6Z6-11@gated-at.bofh.it> <Dvzmp-3Em-1@gated-at.bofh.it> <DvAs9-4kI-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> dnewman@coppi:~$ cat /etc/doas.conf
> permit nopass setenv { 
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin } dnewman
> dnewman@coppi:~$ doas env | grep PATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> dnewman@coppi:~$ doas s mailman3
> doas: s: command not found
> dnewman@coppi:~$ doas /usr/local/sbin/s mailman3
> ? mailman3.service - GNU Mailing List Manager
> ..
>
Do you have an alias for s?

tim@einstein(4):~$ l
/home/tim/bin/l says hello world
tim@einstein(4):~$ alias l='PATH=/bin l'
tim@einstein(4):~$ l
bash: l: command not found
tim@einstein(4):~$ /home/tim/bin/l
/home/tim/bin/l says hello world

The other thing I can think of is you need to run hash -r

(I don't know what doas is, I'm just making guesses)

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

doas 101 question David Newman <dnewman@networktest.com> - 2021-12-17 21:40 +0100
  Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-18 05:20 +0100
    Re: doas 101 question David Newman <dnewman@networktest.com> - 2021-12-18 06:30 +0100
      Re: doas 101 question Tim Woodall <debianuser@woodall.me.uk> - 2021-12-18 08:00 +0100
      Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-18 16:10 +0100
        Re: doas 101 question David Robert Newman <david@davidrobertnewman.com> - 2021-12-25 06:00 +0100
          Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-25 15:00 +0100

csiph-web