title: Root shell spawning
body: <p>I currently study a book about security (I didn't post the book's name because I am not sure about site rules but I can do it if there is no problem with that) and I came across a sample of code who's purpose is to spawn a root shell.</p>
  
  <pre><code>int main(){
    char *name[2];
    name[0] = "/bin/sh";
    name[1] = 0x0;
    execve(name[0], name, 0x0); 
    exit(0);
   }
  </code></pre>
  
  <p>I compile it using <code>gcc shell.c -o shell</code> and then run it, but what I get back is a common shell <code>$</code> instead of a root shell<code>#</code>. Could you tell me why?  </p>