From ac40098ac53c45e26ddfc174d36f65698514ef41 Mon Sep 17 00:00:00 2001 From: ParInshOvGotQuep Date: Thu, 31 Dec 2015 16:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A1=AC=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E7=9A=84shell=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- juser/user_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/juser/user_api.py b/juser/user_api.py index d336d6162..2c16c3dc7 100644 --- a/juser/user_api.py +++ b/juser/user_api.py @@ -151,7 +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 /opt/jumpserver/connect.py '%s'; echo '%s'; echo '%s' | passwd --stdin '%s'" % (username, password, password, username)) + bash("useradd -s %s/connect.py '%s'; echo '%s'; echo '%s' | passwd --stdin '%s'" % + (BASE_DIR, username, password, password, username)) if ssh_key_login_need: gen_ssh_key(username, ssh_key_pwd)