mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 02:39:22 +00:00
Modify server_add_user function
Change adduser to useradd. Make compatible will debian, ubuntu
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user