Running a cocoa app which requires keychain access from root terminal - macos

I am trying to run a cocoa app KeychainTesterApp while I am logged in as root (sudo su).
Here are the steps:
Open terminal -> type sudo su -> Enter password.
Now, I want to open the app , so I do this: sudo -u username open KeychainTesterApp.app. The app starts up, except when I try to do anything related to the keychain I get the error Keychain not found - "A keychain cannot be found to store."
Any thoughts?
Thanks in advance.

The issue you're having above might be that running:
sudo -u username open KeychainTesterApp.app
Will not open the app as root. To open a Cocoa app as root, run the actual executable as sudo:
sudo "SimpleKeychainExample.app/Contents/MacOS/SimpleKeychainExample"
I'm not sure why the app cannot find the keychain you're looking for. Posting a code example from where that app is opening the Keychain might help clarify the question.

Related

“BloomRPC” cannot be opened because the developer cannot be verified

After downloading BloomRPC from the github repo and running brew cask install bloomrpc, when I try to open the BloomRPC application I get "BloomRPC cannot be opened because the developer cannot be verified." I've tried going to Security and Privacy -> Developer Tools -> and enabling BloomRPC under "Allow the apps below to run software locally that does not meet the system's security policy", but I still get the same error message.
I'm on macOS Catalina 10.15.5. How do I open the BloomRPC application?
You can try to build BloomRPC from source (as they mentioned in their repo) Or you can simply bypass this error go navigate to SystemPreference -> Security&Privacy.
Under General tab, you will see a statement about BloomRPC, click on Open Anyway to suppress the warning and continue to use.
Follow these steps:
Type the following command in terminal - sudo xattr -rd com.apple.quarantine
Add space at the end of command
Drag and drop the app into the terminal window right after the command and hit 'return' key
Enter password and you are good to go.
For Bloomrpc the command will look like this:
sudo xattr -rd com.apple.quarantine /Applications/BloomRPC.app

Receiving "Unable to start the server: Permission denied" when attempting to manually start safaridriver on macOS

I am attempting to run safardriver from the /usr/bin folder.
If I run the command without sudo, using /usr/bin/safaridriver -p 0, I am still prompted for a password. Entering my password or the admins password does not work.
If i run the command sudo /usr/bin/safaridriver -p 0, I am prompted for a password, and I enter my password, but recieve the error:
Unable to start the server: Permission denied
I have checked the Allow Remote Automation option under the Develop menu in Safari.
Does anyone have any other suggestions on what I might need to do in order to get this to run?
The issue was twofold. I had to restart my machine to get the sudo to work. Once I did that, I also made myself an admin of the machine. This allowed me to run the command without sudo.

hipchat password not retrieved from credential storage

I am trying to use the OSX Hipchat desktop client v 3.3 (193). I have OSX 10.10.3. I have followed the instructions suggested by Hipchat support https://help.hipchat.com/knowledgebase/articles/166483-mac-beta-client-clearing-preferences
Close your HipChat app
Open Keychain Access (search for Keychain Access in Spotlight)
Click the "login" keychain in the top pane of the left sidebar
Click "passwords" in the bottom pane
Search for "hipchat" using the search box in the upper right and remove any associated entries from the list
Open Terminal (search for Terminal in Spotlight)
At the command prompt, enter the following commands:
defaults delete com.hipchat.HipChat
rm ~/Library/Preferences/com.hipchat.HipChat.plist
rm -rf ~/Library/Caches/com.hipchat.HipChat
rm -rf ~/Library/HipChat
rm -rf ~/Library/Application\ Support/hipchat/
I am still getting this error
I am trying to figure out where on my computer an extra credential to delete must be hiding, or what permissions I have messed up.
I have access through the web interface but I would prefer to use the native app.
I had the same issue and exchanged email with Support. They believe there is a bug in 3.3 involving port settings which will be fixed in the next update which is "due soon." None of the above suggestions worked.
I had to reinstall 3.2.1 and that fixed the problem.
If you haven't already, try:
quit hipchat
restart computer
reset your HipChat password through the web interface
attempt to sign in to app

Enthought canopy won't install

I'm having some trouble installing Canopy on my Mac OS X (running 10.9.5) under my primary username. I get to the point where it asks for the location for the Canopy Environment Directory, but when I hit Continue, it crashes. I have been able to install it on the same computer, using my secondary username, but switching between the two usernames is less than ideal. Would love any suggestions. I already tried removing admin status from the secondary username to see if that changed anything, but it did not.
Thanks to anyone who has suggestions!
Any chance that this is relevant? https://support.enthought.com/entries/23707691-Canopy-GUI-requires-extra-setup-steps-when-user-s-home-path-contains-non-ASCII-characters
I actually had the same problem on my Mac. For me, I resolved it by changing the ownership of my home directory:
Open Terminal
Type in the following commands (hit enter after every line):
cd ~
cd ..
sudo chown <your_username> <your_directory>
replace <your_username> with your username, and <your_directory> with the directory in which all your personal files are stored
The last command may ask for a password. If it does, enter your password and hit Enter.

How to gain root access to Xcode to Disable Code Signing

I am trying to push an app to a jailbroken iPhone for development testing. I want to follow the steps in the second answer in this post, which involves editing Xcode's SDKSettings plist:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist
When I try to edit this file, I get an error that I'm not the owner and cannot unlock it. How do I get root privileges for this file?
Run the following command in Terminal:
sudo chmod 777 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist

Resources