[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

doas 101 question



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



Reply to: