mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-23 08:49:04 +00:00
定义通用模块执行
This commit is contained in:
@@ -143,7 +143,7 @@ def gen_ssh_key(username, password='',
|
||||
with open(authorized_key_file, 'w') as auth_f:
|
||||
auth_f.write(pub_f.read())
|
||||
os.chmod(authorized_key_file, 0600)
|
||||
bash('chown %s:%s %s' % (username, username, authorized_key_file))
|
||||
chown(authorized_key_file, username)
|
||||
|
||||
|
||||
def server_add_user(username, password, ssh_key_pwd, ssh_key_login_need):
|
||||
|
Reference in New Issue
Block a user