This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Executing sudo commands on Mac OSX from shell script
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 01, 2013
08:59 AM
Executing sudo commands on Mac OSX from shell script
Hello,
I'm creating an installer for Mac OS X and I'm having huge issues trying to execute sudo commands. I have the installer checked for "Requires an Administrator Name and Password to Install" but the installer is still failing to execute sudo commands from a bash script that i create in a custom code action and deploy to be executed. The bash script has looks like this ....
#!/bin/bash
#Install XCode Command Line Utilities
cd "/usr/local/bin/AppWrapping/XCode"
hdiutil mount xcode452cltools10_86938211a.dmg
sudo installer -pkg "/Volumes/Command Line Tools (Mountain Lion)/Command Line Tools (Mountain Lion).mpkg" -target /
hdiutil eject "/Volumes/Command Line Tools (Mountain Lion)"
The script is running and mounting the dmg file. then when it trys to run the sudo installer -pkg line i get this error "no tty present and no askpass program specified"
please help...
I'm creating an installer for Mac OS X and I'm having huge issues trying to execute sudo commands. I have the installer checked for "Requires an Administrator Name and Password to Install" but the installer is still failing to execute sudo commands from a bash script that i create in a custom code action and deploy to be executed. The bash script has looks like this ....
#!/bin/bash
#Install XCode Command Line Utilities
cd "/usr/local/bin/AppWrapping/XCode"
hdiutil mount xcode452cltools10_86938211a.dmg
sudo installer -pkg "/Volumes/Command Line Tools (Mountain Lion)/Command Line Tools (Mountain Lion).mpkg" -target /
hdiutil eject "/Volumes/Command Line Tools (Mountain Lion)"
The script is running and mounting the dmg file. then when it trys to run the sudo installer -pkg line i get this error "no tty present and no askpass program specified"
please help...
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 02, 2013
09:41 AM
I think your issue is similare with this one: http://community.flexerasoftware.com/showthread.php?206867-execute-sudo-commands-from-shell-script
Just the message is different, as you're on MAC OS X...
Just the message is different, as you're on MAC OS X...