Commit 5489f3ae authored by 老广's avatar 老广 Committed by GitHub

Modify server_add_user function

Change adduser to useradd.  Make compatible will debian, ubuntu
parent ce7a3d1f
......@@ -151,7 +151,7 @@ def server_add_user(username, ssh_key_pwd=''):
add a system user in jumpserver
在jumpserver服务器上添加一个用户
"""
bash("adduser -s '%s' '%s'" % (os.path.join(BASE_DIR, 'init.sh'), username))
bash("useradd -s '%s' '%s'" % (os.path.join(BASE_DIR, 'init.sh'), username))
gen_ssh_key(username, ssh_key_pwd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment