Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import os
  2. import crypt
  3.  
  4. password ="p@ssw0rd"
  5. encPass = crypt.crypt(password,"22")
  6. os.system("useradd -p "+encPass+" johnsmith")
  7.  
  8. def createUser(name,username,password):
  9. encPass = crypt.crypt(password,"22")
  10. return os.system("useradd -p "+encPass+ " -s "+ "/bin/bash "+ "-d "+ "/home/" + username+ " -m "+ " -c ""+ name+"" " + username)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement