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


Groups > linux.debian.user > #243224

doas 101 question

From David Newman <dnewman@networktest.com>
Newsgroups linux.debian.user
Subject doas 101 question
Date 2021-12-17 21:40 +0100
Message-ID <Dvsbf-6Z6-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 <command name, without full path>'):

permit nopass setenv { 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin } 
dnewman as root
permit nopass keepenv root as root

permit nopass setenv { -ENV PS1=$DOAS_PS1 SSH_AUTH_SOCK } dnewman as root
permit nopass keepenv root as root

The latter is from doas on OpenBSD, but I think that works because 
non-root user accounts already have various sbins in their PATH.

I'm aware that linux-utils changed behavior a few years ago, and that 
non-root users have a more restricted PATH. However, I'm unclear on what 
steps to take so that non-root users can temporarily use root's PATH.

Thanks.

dn

Back to linux.debian.user | Previous | Next — 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