How to run a command that needs admin/root privileges?

Mac OSX specific forum
tester
User
User
Posts: 31
Joined: Sun Dec 28, 2014 1:12 pm

How to run a command that needs admin/root privileges?

Post by tester »

Hi All,

What is the better way to run a command that needs admin/root privileges?
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: How to run a command that needs admin/root privileges?

Post by wilbert »

sudo ?
Windows (x64)
Raspberry Pi OS (Arm64)
tester
User
User
Posts: 31
Joined: Sun Dec 28, 2014 1:12 pm

Re: How to run a command that needs admin/root privileges?

Post by tester »

wilbert wrote:sudo ?
Unfortunately, this command does not work with PB RunProgram().
Fred
Administrator
Administrator
Posts: 16681
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: How to run a command that needs admin/root privileges?

Post by Fred »

It should, if you are in the sudoer list without needing a password.
Post Reply