Run Command on Current User

foreverkan
New Contributor II

Hello,

 

I need to run a command for current user. I tried with script but it work for root account.

 

I need the run this command for current users.

defaults write com.google.chrome IncognitoModeAvailability 0

2 REPLIES 2

sdagley
Esteemed Contributor II

@foreverkan See the https://scriptingosx.com/2020/08/running-a-command-as-another-user/ blog post detailing how to run something as the current user.

AJPinto
Honored Contributor II