MacOS – “networksetup is trying to modify the system network configuration” dialogue wont go away!

keychainmacosNetworkvpn

I keep getting this dialogue on a recently upgraded MacBook running El Capitan — it doesn't matter how many times I enter my password, it just keeps opening and opening:

enter image description here

This is appearing when trying to launch the Private Internet Access VPN client.

I've contacted their support numerous times and they just keep saying "ask Apple for help" (great..), but Apple has been unresponsive as well. I've been told it may have something to do with either

1) corrupt disk permissions ( which I've repaired, did not help)
2) corrupt keychain ( I rebuilt my keychain, did not help)
3) corrupt admin permissions (wasn't entirely sure how to repair this one..)

If ANYONE knows how I can get this stupid dialogue to go away so I can connect to my VPN client it would be much appreciated!

On a previous OSX install I had the client working fine (in Yosemite). When I did a fresh install for El Capitan, I tried to install it via HomeBrew, but that is when it stopped working. I've since uninstalled it from HomeBrew and tried to install via the website package, but I just get this error over and over and over. No matter how many times I enter the password.

EDIT additional information:

The client installs / runs fine if I create a fresh user account and install it there. This will not work for me — I need it to run on my main (admin / primary) account.

I've tried installing the client both via Homebrew (Cask package manager), as well as through the download link from the PIA website. Both have the same issue.

I believe the issue began when I attempted to install through Homebrew — I had had it installed the "normal" way in the past and it worked fine. Uninstalled the app. Went to reinstall it a few months later, this time through Cask, and then the issue started.

EDIT 2:

Here are the contents of my PATH.

My user account (the one that needs fixing):

/Users/Tom/.rvm/gems/ruby-2.0.0-p645/bin:/Users/Tom/.rvm/gems/ruby-2.0.0-p645@global/bin:/Users/Tom/.rvm/rubies/ruby-2.0.0-p645/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Tom/.rvm/bin

A "fresh" user account:

/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

Best Answer

I tried to replicate your environment in a OS X 10.11 VM (including homebrew/cask and rvm). After some trying I have been able to reproduce the error at times.

In my opinion the error is related with wrong permissions in your user folder, a really crappy app (the private-internet-access app) and probably your ruby/rvm environment.

The error you get is (probably) related with SCHelper and nehelper which can't fulfill their tasks successfully.

File Created: /Library/Preferences/SystemConfiguration/preferences.plist-new Modifying Program: SCHelper Process ID: 773 Process Owner: System Admin User ID: 0 Time recorded: 22:21:04, Sat. Jan. 16, 2016
...
File Renamed: /Library/Preferences/com.apple.networkextension.plist Modifying Program: nehelper Process ID: 183 Process Owner: System Admin User ID: 0 Time recorded: 22:21:04, Sat. Jan. 16, 2016
...
File ownership changed: /Library/Preferences/com.apple.networkextension.plist Modifying Program: nehelper Process ID: 183 Process Owner: System Admin User ID: 0 Time recorded: 22:21:04, Sat. Jan. 16, 2016

Please try the following:

  1. Rename your bash config files:

    cd ~/
    mv .bash_profile temp.bash_profile
    mv .profile temp.profile
    mv .bashrc temp.bashrc
    
  2. Remove all traces of private-internet-access in homebrew:

    brew cask uninstall private-internet-access
    brew cask uninstall --force private-internet-access
    brew cask cleanup
    brew cask doctor
    brew doctor
    
  3. Enable your root user, log-out your current user and login as root

  4. Remove the following files and folders:

    • /Applications/Private Internet Access.app
    • /Users/your_user/.pia_manager (folder)
    • /Users/your_user/.pia_manager_crash.log
    • /Users/your_user/Library/Private Internet Access (folder)
    • /Users/your_user/Library/LaunchAgents (folder)

    I tried to remove all these files and folders with sudo rm ... which wasn't successful. Some files were recreated immediately even after stopping/unloading the respective plist with launchctl. Therefore I used root.

  5. log-out as root, reboot, login as your main user and disable your root user.
  6. Recreate your LaunchAgents folder:

    mkdir ~/Library/LaunchAgents
    
  7. Download, reinstall, setup and test Private Internet Access
  8. Rename your bash config files:

    cd ~/
    mv temp.bash_profile .bash_profile
    mv temp.profile .profile
    mv temp.bashrc .bashrc
    

I recommend the following:

Follow the instructions and install and use Tunnelblick (instead of installing Private Internet Access).