• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode Debugger, run as root?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode Debugger, run as root?


  • Subject: Re: Xcode Debugger, run as root?
  • From: Philippe Casgrain <email@hidden>
  • Date: Mon, 9 Nov 2009 18:02:16 -0500


Le 2009-11-09 à 14:44, Xochitl Lunde a écrit :

I am wondering if anyone can assist me in following any of Chris Miner's directions? Does anyone know of any tutorials for configuring remote debugging? My searches aren't yielding anything. I am trying to get Xcode to debug a program which must run as root.

It's been a while since I did this, but I believe all you have to do is:

1. Enable the root user: http://support.apple.com/kb/HT1528

2. Enable "Remote Login" (which turns on the ssh daemon) in System Preferences / Sharing

3. Create a public / private key combo and install the public key in the .ssh/authorized_keys folder for your root user. There are many tutorials to do this (not especially centered on root user for obvious security reasons). Google "ssh authorized_keys" for more info.

When all this is done, you should be able to type "ssh root@localhost" from your current account and get a root shell without having to enter a password. That is key to get remote debugging to work.

Remote debugging is usually with a remote computer (e.g. ssh remoteuser@remotecomputer) but this time we're doing everything local, with the root user.

4. Enable remote debugging in Xcode: Get Info on your executable, and in the Debug tab check "Debug executable remotely via ssh" using "root@localhost" as the "connect to:" info.

Voilà!

Philippe

Chris Miner <email@hidden> wrote on 07/14/2009 01:10:55 PM:

>
> Am 14.07.2009 um 17:34 schrieb Xochitl Lunde:
>
> > My program now exits saying "this program must be run with root
> > permission." in the console window. How can I get Xcode to run it
> > with root permission? (I do have the root password.)
>
>
> You could set up your machines root user with ssh info, and provide
> this root user with your own ssh public key(s). Then configure remote
> debugging for your executable; connecting as root@localhost. Then
> fire up the debuger like normal in xcode. Worked for me.
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Xcode Debugger, run as root?
      • From: Xochitl Lunde <email@hidden>
References: 
 >Re: Xcode Debugger, run as root? (From: Xochitl Lunde <email@hidden>)

  • Prev by Date: Re: Bundle for local html files
  • Next by Date: Re: iLife Media browser
  • Previous by thread: Re: Xcode Debugger, run as root?
  • Next by thread: Re: Xcode Debugger, run as root?
  • Index(es):
    • Date
    • Thread