Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MAC command to run a .pkg file on terminal

Tags:

macos

I have a .mpkg file which i want to execute from the terminal I sucessfully used this command to achive this

sudo installer -pkg Snip.mpkg -target /Applications

But the thing is that when i run this command it ask me for the admin password before performing the installation. Is there a way i can do this without the password or can i provide the password also in my sudo installer command...

Also see :- Running .pkg on MAC OS from java code

please reply

thanks in advance

like image 852
Jinith Avatar asked Mar 14 '11 12:03

Jinith


1 Answers

Remove the password requirement from sudo using the following line in sudoers:

jinith ALL=(ALL) NOPASSWD: ALL 

Do note the other solution will add the password to the process list. Mine will make it so that user jinith can run any command as any user without a password.

like image 129
hd1 Avatar answered Nov 15 '22 05:11

hd1