Author: ekohl
Date: Sun Jan 6 13:03:01 2013
New Revision: 58128
URL:
http://svn.reactos.org/svn/reactos?rev=58128&view=rev
Log:
[SAMSRV]
SAM Setup: Set the UserAccountControl flags when user accounts are created.
Modified:
trunk/reactos/dll/win32/samsrv/setup.c
Modified: trunk/reactos/dll/win32/samsrv/setup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/setup.c?r…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] Sun Jan 6 13:03:01 2013
@@ -221,7 +221,8 @@
static BOOL
SampCreateUserAccount(HKEY hDomainKey,
LPCWSTR lpAccountName,
- ULONG ulRelativeId)
+ ULONG ulRelativeId,
+ ULONG UserAccountControl)
{
SAM_USER_FIXED_DATA FixedUserData;
LPWSTR lpEmptyString = L"";
@@ -235,6 +236,7 @@
FixedUserData.Version = 1;
FixedUserData.UserId = ulRelativeId;
+ FixedUserData.UserAccountControl = UserAccountControl;
swprintf(szAccountKeyName, L"Users\\%08lX", ulRelativeId);
@@ -673,11 +675,13 @@
{
SampCreateUserAccount(hDomainKey,
L"Administrator",
- DOMAIN_USER_RID_ADMIN);
+ DOMAIN_USER_RID_ADMIN,
+ USER_DONT_EXPIRE_PASSWORD | USER_NORMAL_ACCOUNT);
SampCreateUserAccount(hDomainKey,
L"Guest",
- DOMAIN_USER_RID_GUEST);
+ DOMAIN_USER_RID_GUEST,
+ USER_ACCOUNT_DISABLED | USER_DONT_EXPIRE_PASSWORD |
USER_NORMAL_ACCOUNT);
RegCloseKey(hDomainKey);
}