This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from passlib.hash import sha512_crypt | |
| import subprocess | |
| import pwd | |
| def add_user(username, password): | |
| pwd = sha512_crypt.encrypt(password) | |
| return subprocess.call(["useradd", username, "-m", "-p", pwd]) | |
| def del_user(username): | |
| return subprocess.call(["userdel", "-r", username]) |