From 11d1b3f233bebfdf4f4749b3be5f69d52b0f01f8 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 4 Oct 2023 09:42:42 +0200 Subject: Revert "login: T5521: home directory owner changed during reboot" This reverts commit 074870dad33d80e78128736f9e89bdfa1a0e08fd. --- src/conf_mode/system-login.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index 0dc84039e..02c97afaa 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -28,7 +28,6 @@ from vyos.configverify import verify_vrf from vyos.defaults import directories from vyos.template import render from vyos.template import is_ipv4 -from vyos.utils.boot import boot_configuration_complete from vyos.utils.dict import dict_search from vyos.utils.process import cmd from vyos.utils.process import call @@ -279,6 +278,8 @@ def generate(login): if os.path.isfile(tacacs_nss_config_file): os.unlink(tacacs_nss_config_file) + + # NSS must always be present on the system render(nss_config_file, 'login/nsswitch.conf.j2', login, permission=0o644, user='root', group='root') @@ -302,12 +303,6 @@ def generate(login): def apply(login): - # Script is invoked from vyos-router.service during startup. - # While configuration mounting and so on is not yet complete, - # skip any code that messes with the local user database - if not boot_configuration_complete(): - return None - if 'user' in login: for user, user_config in login['user'].items(): # make new user using vyatta shell and make home directory (-m), -- cgit v1.2.3