From 893ead2fe9b3cd21a522ba369a70d385b6b46a80 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 24 Feb 2023 22:00:56 +0100 Subject: login: T1948: drop absolut path to /usr/libexec/vyos, re-use vyos.defaults --- src/conf_mode/system-login.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index e26b81e3d..8fc18bc37 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -28,6 +28,7 @@ from time import sleep from vyos.config import Config from vyos.configdict import dict_merge from vyos.configverify import verify_vrf +from vyos.defaults import directories from vyos.template import render from vyos.template import is_ipv4 from vyos.util import cmd @@ -159,7 +160,7 @@ def generate(login): # remove old plaintext password and set new encrypted password env = os.environ.copy() - env['vyos_libexec_dir'] = '/usr/libexec/vyos' + env['vyos_libexec_dir'] = directories['base'] # Set default commands for re-adding user with encrypted password del_user_plain = f"system login user '{user}' authentication plaintext-password" -- cgit v1.2.3