title: nohup'ing a sudo command - doesn't seem to work
body: <p>I've read <a href="https://stackoverflow.com/questions/17475098/getting-sudo-and-nohup-to-work-together">this</a> and several other articles but I can't figure this out. This is what I've put together:</p>
  
  <ol>
  <li><code>sudo nohup</code> or <code>nohup sudo</code> (I've tried both) the command without the background <code>&amp;</code> (so you can enter your password before detaching it)</li>
  <li>Enter the password</li>
  <li><code>^Z</code> then <code>bg</code></li>
  <li><code>disown</code> the pid (doesn't work for some reason)</li>
  <li>Log out</li>
  </ol>
  
  <p>Here's the output:</p>
  
  <pre><code>[user@localhost ~]$ nohup sudo dd if=/dev/zero of=/dev/sda bs=1M
  nohup: ignoring input and appending output to ‘nohup.out’
  [sudo] password for user: 
  ^Z
  [1]+  Stopped                 nohup sudo dd if=/dev/zero of=/dev/sda bs=1M
  [user@localhost ~]$ bg
  [1]+ nohup sudo dd if=/dev/zero of=/dev/sda bs=1M &amp;
  [user@localhost ~]$ sudo ps | grep dd
   2458 pts/32   00:00:00 dd
  [user@localhost ~]$ disown 2458
  -bash: disown: 2458: no such job
  [user@localhost ~]$ logout
  Connection to [server] closed.
  $ remote
  Last login: Mon Feb  3 11:32:59 2014 from [...]
  [user@localhost ~]$ sudo ps | grep dd
  [sudo] password for user: 
  [user@localhost ~]$
  </code></pre>
  
  <p>So the process is gone. I've tried a few other combinations with no success. Any ideas to make this work?</p>