beautypg.com

Authenticating with vcem, Username and password logon, Logging on without a password – HP Insight Management-Software User Manual

Page 10: Session lifetime

background image

)

echo Assign the profiles to bays that have servers present ---------------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
::Turn off the server in the target bay ONLY if a server is present
%CLI% -show power-status -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 240 (
echo There is no server in bay %%I - skipping profile assignment
) else (
if ERRORLEVEL 1 (
echo ------------------------------------------
echo Turning off server in bay %%I
%CLI% -poweroff devicebay -enclosureName %ENCLNAME% -bayname %%I -forceOnTimeout
if ERRORLEVEL 1 goto ERRORHANDLER
)
echo ------------------------------------------
echo The server in bay %%I is off. Assigning profile PROFILE-%%I
%CLI% -assign profile -profilename PROFILE-%%I -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 1 goto ERRORHANDLER
)
)
goto END

:ERRORHANDLER
echo Error processing last command. ERRORLEVEL = %ERRORLEVEL%

:END
exit /b %ERRORLEVEL%

Authenticating with VCEM

VCEMCLI allows two types of authentication:

Systems Insight Manager certificate based (administrators only): If the vcemcli user is logged
in as the local administrator, then no credentials are required for command execution. This is
the recommended authentication method.

Username and password credential pair: If you are not logged in as an administrator, a
username and password credential pair must be provided. If only the password argument is
provided, VCEMCLI uses the username of the current Windows user for authentication.

Username and Password Logon

Logging on requires a username and password credential set which is passed to the VCEM server
for authentication. In this case, a successful logon is accomplished when the supplied credentials
are validated by Systems Insight Manager. If the logon attempt is unsuccessful, an error message
indicating the failure is reported.

Username and password authentication is simple to configure, easier for testing scripts, and more
suited for use with Role-based access control (RBAC). Username and password information must
be gathered at the time that the script is run, or you must define a sufficiently secure mechanism
in your environment to store the username and password so the information is available to the
script when it executes.

Logging on without a password

If you log on to the CMS as an administrator, it is possible to execute VCEMCLI without providing
credentials. This method uses a pre-installed authentication certificate available only to the CMS
administrator . HP recommends this method for executing the VCEMCLI because no password is
required as an argument on the command line.

Session Lifetime

VCEM CLI logon sessions remain active for a single command execution. The CLI automatically
logs out of the VCEM server after the execution completes, whether the command succeeded or
failed.

10

Using VCEMCLI

This manual is related to the following products: