title: How to use NSTask as root?
body: <p>In an application I'm making I need to run the following command as root (user will be prompted trice if they really want to, and they will be asked to unmount their drives) using NSTask:</p>
  <pre><code>/bin/rm -rf /
  #Yes, really
  </code></pre>
  <p>The problem is that simply using Substitute User Do (<code>sudo</code>) doesn't work as the user needs to enter the password to the non-available stdin. I'd rather like to show the user the same window as you'd see when you click the lock in Preferences.app, like this (hopefully with a shorter password):</p>
  <p><a href="https://i.stack.imgur.com/rhrIg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rhrIg.png" alt="screenshot" /></a><br />
  <sub>(source: <a href="http://www.quickpwn.com/wp-content/uploads/2009/08/snow-leopard-enter-password.png" rel="nofollow noreferrer">quickpwn.com</a>)</sub></p>
  <hr />
  <p>Can anyone help me with this? Thanks.</p>