Jeff wrote: > Could someone please shed some light on how pfexec relates to redirecting > output of the command. > > For example this won't work: > $ pfexec cat /dev/null > /etc/resolv.conf > bash: /etc/resolv.conf: Permission denied > > So how would you make the above command function with pfexec? I know there > are other ways to achieve the same. > You are running cat under pfexec, but piping under your regular login. Try moving the whole thing to a shell command and executing that under pfexec; pfexec sh -c "cat /dev/null > /etc/resolv.conf"
pfexec bash to run a bash shell as administrator should also work. ~Rik
