Sample Header Ad - 728x90

"doas" allow user to run command with other user and set environment variables

2 votes
1 answer
6520 views
There are two normal users on my OpenBSD machine ("user" and "TESTUSER") and I have this doas config: # cat /etc/doas.conf permit setenv { DISPLAY=:0 } nopass user /usr/X11R6/bin/xcalc as TESTUSER # But when I try to run the "xcalc" with the "user" (as "TESTUSER") I only got a syntax error: $ id uid=1000(user) gid=1000(user) groups=1000(user), 0(wheel) $ doas /usr/X11R6/bin/xcalc doas: syntax error at line 1 $ **The Question**: what syntax error did I make? https://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/doas.1 https://man.openbsd.org/doas.conf
Asked by Hessnov (591 rep)
Dec 10, 2017, 09:12 PM
Last activity: Feb 26, 2023, 05:47 PM