Skip to content

Commit 2aac4c4

Browse files
taoyl-mslguohan
authored andcommitted
[tacplus nss conf] tacplus should be before compat (#2163)
1 parent 969ba5b commit 2aac4c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

files/image_config/hostcfgd/hostcfgd

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ class AaaCfg(object):
127127
# Add tacplus in nsswitch.conf if TACACS+ enable
128128
if 'tacacs+' in auth['login']:
129129
if os.path.isfile(NSS_CONF):
130-
os.system("sed -i -e '/tacplus/b' -e '/^passwd/s/compat/& tacplus/' /etc/nsswitch.conf")
130+
os.system("sed -i -e '/tacplus/b' -e '/^passwd/s/compat/tacplus &/' /etc/nsswitch.conf")
131131
else:
132132
if os.path.isfile(NSS_CONF):
133-
os.system("sed -i -e '/^passwd/s/ tacplus//' /etc/nsswitch.conf")
133+
os.system("sed -i -e '/^passwd/s/tacplus //' /etc/nsswitch.conf")
134134

135135
# Set tacacs+ server in nss-tacplus conf
136136
template_file = os.path.abspath(NSS_TACPLUS_CONF_TEMPLATE)

0 commit comments

Comments
 (0)