From 5d4c1068259b7497354a450273c95bbb6bea9268 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 9 Jan 2024 13:59:11 +0100 Subject: [PATCH] fix: refs #5848 Added flag DONT_EXPIRE_PASSWD --- modules/account/back/models/samba-config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/account/back/models/samba-config.js b/modules/account/back/models/samba-config.js index f5672ca21..927510a29 100644 --- a/modules/account/back/models/samba-config.js +++ b/modules/account/back/models/samba-config.js @@ -7,7 +7,8 @@ const execFile = require('child_process').execFile; * https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties */ const UserAccountControlFlags = { - ACCOUNTDISABLE: 2 + ACCOUNTDISABLE: 0x2, + DONT_EXPIRE_PASSWD: 0x10000 }; module.exports = Self => { @@ -118,7 +119,8 @@ module.exports = Self => { } entry = { - userAccountControl: sambaUser.userAccountControl + userAccountControl: (sambaUser.userAccountControl + | UserAccountControlFlags.DONT_EXPIRE_PASSWD) & ~UserAccountControlFlags.ACCOUNTDISABLE, uidNumber: info.uidNumber, accountExpires: 0,