krn.CheckUserAccount
This job checks whether the specified user can log into the system. The given password is checked — an incorrect password can lead to account lockout (same criteria as in the enaio® enterprise-manager).
The job returns with an error if the user cannot log into the system.
The job runs on the existing session and does not open a session for the checked user — it returns no SessionGUID, only the verdict.
1. Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
|
INT |
Yes |
Must be |
|
STRING |
Yes |
Login name of the user. Matched case-insensitively. |
|
STRING |
Yes |
Encrypted password — same format as krn.SessionLogin/ |
Password is a mandatory parameter. A call without it — for instance as a name-only existence check — is rejected with -1043332470 ("A required parameter was not specified: Password.").
|
2. Output Parameters
| Name | Type | Dependency | Description |
|---|---|---|---|
|
INT |
— |
Result of login check: |
|
INT |
only when |
Password validity: |
|
STRING |
only when |
Internal user name in the spelling the server resolved it to, e.g. |
|
STRING |
only when |
Authentication method, e.g. |
3. Return Value
(INT): 0 = job successful, otherwise error code.
In practice only Action = 0 occurs: the failure cases 2, 3, 4 and 5 documented in the table come back as an error code instead — consistent with the job returning an error if the user cannot log in.
| Code | Server message | Documented Action equivalent |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
— (caller not authorised) |
-1042218019 is returned both for a manually locked account and for one locked by failed logins, and also with a correct password. The two cases are not distinguishable from the response.
|
Treat only |
4. Required System Role
|
The calling user needs system role
The role is necessary and sufficient and independent of every other role: a user holding only this role succeeds; a user holding the other 71 roles fails with The system roles assigned to the calling user can be determined with mng.GetUserRoles; an overview of all roles is available under System Roles. |
5. Lockout Behaviour
-
The failed-attempt counter is per account; other accounts are unaffected.
-
A successful call resets the counter. Alternating correct and wrong checks therefore never trip the lock.
-
What a failed attempt does is governed by the security level (
Login\SecurityLevel, default0= no restriction; the other levels close the application or lock the account after three failed attempts). The setting does not apply to users with two-factor authentication. -
The threshold is not readable through the API — entries such as
Security\PwdLockCount,MaxLoginAttemptsorLoginRetriesdo not exist (krn.REGetRegValue returns-1042218742). Callers must throttle their own attempts.
|
A lockout caused by failed logins is not visible in the user attributes.
For an account locked this way, mng.GetUserAttributes keeps reporting |
6. Related Settings
| enaio® enterprise-manager | Registry entry | Default | Effect on this job |
|---|---|---|---|
Gültigkeitszeitraum für Passwörter |
|
|
|
Hinweis auf den Ablauf des Gültigkeitszeitraums |
|
|
drives enaio®'s own warning, not |
Einmal-Passwort |
|
|
new accounts report |
Sicherheitsstufe |
|
|
whether failed attempts lock the account |
7. See Also
-
krn.SessionLogin — actual login of a session
-
krn.VerifyPassword — checks a password against the password syntax rule (not a credential check)
-
mng.GetUserAttributes — user attributes including
lockedandchangepwd