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:04:27 +0100
commitc736516e65d280eed74e4756fa89004c3cde21a3 (patch)
tree6608b38c9dee46802725066d08a1cf7d37732d8f /src
parent85dd9a42f58a568ff557756a8491b84849e3be72 (diff)
downloadvyos-1x-c736516e65d280eed74e4756fa89004c3cde21a3.tar.gz
vyos-1x-c736516e65d280eed74e4756fa89004c3cde21a3.zip
login: T3208: fix wrong string formatting on my_set
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. (cherry picked from commit a7fe2ff4fdfcb2619b892aff170d42609965b20b)
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)