mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-21 11:33:03 +00:00
修复中文字符报错
This commit is contained in:
@@ -151,8 +151,8 @@ def server_add_user(username, password, ssh_key_pwd='', ssh_key_login_need=True)
|
||||
add a system user in jumpserver
|
||||
在jumpserver服务器上添加一个用户
|
||||
"""
|
||||
bash("useradd -s %s/connect.py '%s'; echo '%s'; echo '%s:%s' | chpasswd " %
|
||||
(BASE_DIR, username, password, username, password))
|
||||
bash("useradd '%s'; echo '%s'; echo '%s:%s' | chpasswd " %
|
||||
(username, password, username, password))
|
||||
if ssh_key_login_need:
|
||||
gen_ssh_key(username, ssh_key_pwd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user