IMetabaseSecurity.CheckAuditLoginConsistency

Syntax

CheckAuditLoginConsistency([Options: CheckAuditLoginConsistencyOptions = 0]);

Parameters

CheckAuditLoginConsistencyOptions. Parameter of checking a security subsystem service user (p4audit). By default only the user is checked.  

Description

The CheckAuditLoginConsistency method checks the presence and consistency of a (p4audit) security subsystem service user.

Comments

The p4sudit user is required for correct functioning of audit and users blocking.

If defects in mechanism functioning were detected when checking, an exception error with specifying of incorrectness source of audit mechanism functioning is generated.

Using different values of the CheckAuditLoginConsistencyOptions parameter, one can create or change service user password. For example, if the CheckAuditLoginConsistencyOptions.RecreateIfNeeded parameter is specified, the user is created anew or updated if necessary. If there is no user on the server or if a user is created with a predetermined password, a standard credentials request dialog box of server administrator opens.

Fore Example

Sub UserProc;
Begin
    
Try
        MetabaseClass.Active.Security.CheckAuditLoginConsistency;
        WinApplication.InformationBox(
"Checking is performed");
    
Except
        
On E: Exception Do
        WinApplication.InformationBox(E.message);
    
End Try;
End Sub UserProc;

A message is displayed according to the results of checking.

Fore.NET Example

This example is an entry point for any .NET assembly.

    Public Shared Sub Main(Params: StartParams);
    Begin
        Try
            Params.Metabase.Security.CheckAuditLoginConsistency(CheckAuditLoginConsistencyOptions.cheaudlogconoptDefault);
            MessageBox.Show("Checking is performed");
        Except
            On E: Exception Do
            MessageBox.Show(E.message);
        End Try;
    End Sub;

A message is displayed according to the results of checking.

See also:

IMetabaseSecurity