Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import crypt
- password ="p@ssw0rd"
- encPass = crypt.crypt(password,"22")
- os.system("useradd -p "+encPass+" johnsmith")
- def createUser(name,username,password):
- encPass = crypt.crypt(password,"22")
- 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