mirror of
https://github.com/reactos/reactos.git
synced 2024-08-11 13:48:01 +00:00
[NET]
- Display workstations. - Implement the /ACTIVATE option to enable/disable user accounts. svn path=/trunk/; revision=65167
This commit is contained in:
parent
7fbedc7a2a
commit
8031de0f5d
|
@ -161,7 +161,7 @@ DisplayUser(LPWSTR lpUserName)
|
||||||
|
|
||||||
PrintToConsole(L"\n");
|
PrintToConsole(L"\n");
|
||||||
|
|
||||||
PrintToConsole(L"Password expires ");
|
PrintToConsole(L"Password last set ");
|
||||||
dwLastSet = GetTimeInSeconds() - pUserInfo->usri4_password_age;
|
dwLastSet = GetTimeInSeconds() - pUserInfo->usri4_password_age;
|
||||||
PrintDateTime(dwLastSet);
|
PrintDateTime(dwLastSet);
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ DisplayUser(LPWSTR lpUserName)
|
||||||
PrintToConsole(L"User may change password %s\n", (pUserInfo->usri4_flags & UF_PASSWD_CANT_CHANGE) ? L"No" : L"Yes");
|
PrintToConsole(L"User may change password %s\n", (pUserInfo->usri4_flags & UF_PASSWD_CANT_CHANGE) ? L"No" : L"Yes");
|
||||||
|
|
||||||
PrintToConsole(L"\n");
|
PrintToConsole(L"\n");
|
||||||
PrintToConsole(L"Workstation allowed %s\n", pUserInfo->usri4_workstations);
|
PrintToConsole(L"Workstations allowed %s\n", (pUserInfo->usri4_workstations == NULL || wcslen(pUserInfo->usri4_workstations) == 0) ? L"All" : pUserInfo->usri4_workstations);
|
||||||
PrintToConsole(L"Logon script %s\n", pUserInfo->usri4_script_path);
|
PrintToConsole(L"Logon script %s\n", pUserInfo->usri4_script_path);
|
||||||
PrintToConsole(L"User profile %s\n", pUserInfo->usri4_profile);
|
PrintToConsole(L"User profile %s\n", pUserInfo->usri4_profile);
|
||||||
PrintToConsole(L"Home directory %s\n", pUserInfo->usri4_home_dir);
|
PrintToConsole(L"Home directory %s\n", pUserInfo->usri4_home_dir);
|
||||||
|
@ -288,7 +288,12 @@ cmdUser(
|
||||||
lpUserName,
|
lpUserName,
|
||||||
4,
|
4,
|
||||||
(LPBYTE*)&pUserInfo);
|
(LPBYTE*)&pUserInfo);
|
||||||
printf("Status: %lu\n", Status);
|
if (Status != NERR_Success)
|
||||||
|
{
|
||||||
|
printf("Status: %lu\n", Status);
|
||||||
|
result = 1;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (bAdd && !bDelete)
|
else if (bAdd && !bDelete)
|
||||||
{
|
{
|
||||||
|
@ -309,11 +314,11 @@ cmdUser(
|
||||||
p = &argv[i][8];
|
p = &argv[i][8];
|
||||||
if (_wcsicmp(p, L"yes") == 0)
|
if (_wcsicmp(p, L"yes") == 0)
|
||||||
{
|
{
|
||||||
|
UserInfo.usri4_flags &= ~UF_ACCOUNTDISABLE;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(p, L"no") == 0)
|
else if (_wcsicmp(p, L"no") == 0)
|
||||||
{
|
{
|
||||||
|
UserInfo.usri4_flags |= UF_ACCOUNTDISABLE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue