summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-11 19:02:53 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-11 19:02:53 +0100
commita7fe2ff4fdfcb2619b892aff170d42609965b20b (patch)
treeea0e03760a8c76dda3ae127c0cfcc22315d955f4 /src
parent4fb6160fb72717ce65cc1dbd814b80a1d1a4e756 (diff)
downloadvyos-1x-a7fe2ff4fdfcb2619b892aff170d42609965b20b.tar.gz
vyos-1x-a7fe2ff4fdfcb2619b892aff170d42609965b20b.zip
login: T3208: fix wrong string formatting on my_setvyos/1.4dev0
Commit e8a1c291 ("login: radius: T3192: migrate to get_config_dict()") did an invalid forward of the newly encrypted passwort to my_set to store it inside the config.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system-login.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py
index 10d297aff..99af5c757 100755
--- a/src/conf_mode/system-login.py
+++ b/src/conf_mode/system-login.py
@@ -158,11 +158,11 @@ def generate(login):
env = os.environ.copy()
env['vyos_libexec_dir'] = '/usr/libexec/vyos'
- call(f"/opt/vyatta/sbin/my_delete system login user '{user}' "
- "authentication plaintext-password", env=env)
+ call(f"/opt/vyatta/sbin/my_delete system login user '{user}' " \
+ f"authentication plaintext-password", env=env)
- call(f"/opt/vyatta/sbin/my_set system login user '{user}' "
- "authentication encrypted-password '{encrypted_password}'", env=env)
+ call(f"/opt/vyatta/sbin/my_set system login user '{user}' " \
+ f"authentication encrypted-password '{encrypted_password}'", env=env)
else:
try:
if getspnam(user).sp_pwdp == dict_search('authentication.encrypted_password', user_config):
@@ -212,7 +212,6 @@ def apply(login):
else: command += f" -d '/home/{user}'"
command += f' -G frrvty,vyattacfg,sudo,adm,dip,disk {user}'
-
try:
cmd(command)