summaryrefslogtreecommitdiff
path: root/src/conf_mode/system_login.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/system_login.py')
-rwxr-xr-xsrc/conf_mode/system_login.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/system_login.py b/src/conf_mode/system_login.py
index 30e823bd4..cff0c5039 100755
--- a/src/conf_mode/system_login.py
+++ b/src/conf_mode/system_login.py
@@ -367,6 +367,12 @@ def apply(login):
if os.path.exists(f'{home_dir}/.google_authenticator'):
os.remove(f'{home_dir}/.google_authenticator')
+ # Lock/Unlock local user account
+ lock_unlock = '--unlock'
+ if 'disable' in user_config:
+ lock_unlock = '--lock'
+ cmd(f'usermod {lock_unlock} {user}')
+
if 'rm_users' in login:
for user in login['rm_users']:
try: