Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Automatic Operation Service Template Reference


2.9.2 Get lists of OS users by batch

Function

This service template acquires a list of Windows/Linux users and, as a batch, a server list from a CSV file.

This service template assumes that the following servers are being used.

• Windows servers

• Linux servers

The following tasks are performed.

(1) A list of Windows/Linux servers is acquired from the specified column in the CSV file. State the column name in the first line of the CSV file. State the data in the 2nd through 100th lines. At least one column must state the host name or IP address.

(Example 1)

Host name

hostVM001

hostVM002

(Example 2)

Host name, comment

hostVM001,#Comment1

hostVM002,#Comment2

"172.16.254.7",#Comment3

(2) No more than 99 host names or IP addresses can be stated in a CSV file and the total character string length of host names or IP addresses + the host count cannot exceed 1,017 characters.

(3) The fields read are checked for the following conditions. If any of these conditions are met, the task fails.

(a) Are there any blank (null) fields or lines?

(b) Do any fields exceed 256 in character string length?

(c) Do any fields contain the following special characters?

, < > | ; & * ? ` % or a double quote (") not at an end of a field, or a backslash (\) at the end of a field

(d) Does any field contain a control character (0x00 through 0x1f)?

(4) An OS user list is output in text format to the specified file for each Windows/Linux server. The name of the file is OS_Users_XXXX. Here, XXXX specifies the host name or IP address as stated in the string specified in the CSV file. For Windows, the output format of the file is the same as the output result of the net user command.

(5) The OS user list file is transferred to the folder specified by the JP1/AO server. The transfer source file on the Windows/Linux server is deleted.

Prerequisites

For the latest support information about [Required product for the system]/[Required products for the service template execution system]/[Prerequisite product OS running in the system executing the service template], see the release notes.

[Required product in the System]

Job Management Partner 1/Automatic Operation 10-50 or later

[Required products for the service template execution system]

None.

[Prerequisite product OS running in the system executing the service template]

(1) Windows Server 2003, Standard Edition/Enterprise Edition (x86/x64) SP1 or later, Windows Server 2003 R2, Standard Edition/Enterprise Edition (x86/x64)

(2) Windows Server 2008 Standard/Enterprise (x86/x64), Windows Server 2008 R2 Standard/Enterprise/Datacenter

(3) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(4) Red Hat Enterprise Linux 5 Advanced Platform (x86), Red Hat Enterprise Linux 5 (x86), Red Hat Enterprise Linux 5 Advanced Platform (AMD/Intel 64), Red Hat Enterprise Linux 5 (AMD/Intel 64)

(5) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)

[Usage conditions for prerequisite products in the system]

None.

[Usage conditions of prerequisite products in the system executing the service template]

None.

Cautions

(1) In order to execute this service, the JP1/AO server (loopback address resolved by localhost) and the server that is the connection destination must be set as agentless connection destinations.

(2) IP addresses in the CSV file must be enclosed in double quotation marks.

(3) If you are executing this service in a Linux environment, do not use multibyte characters in properties.

(4) Due to ODBC driver restrictions, the following characters cannot be used in CSV file names: [ ] ! `

(5) If you specify multibyte characters and the OS of the server acquiring the list of OS users is Windows, specify a value for the Windows output folder (remote) property that is no longer than 248 bytes.

(6) If you specify multibyte characters, specify a value for the output file name (local) property that is no longer than 256 bytes.

(7) When the folder names specified as remote and local already exist, the existing folders are overwritten. Also, when there is a file by the same name in the folder, it too is overwritten. For this reason, exercise sufficient caution that folder names are specified correctly.

(8) If there is no folder at the path specified as remote, the folder is created. The created folder is left undeleted. If it is not used periodically, delete it.

Version

01.50.01

Category

OS_Operations/Management

Property list

The following shows the list of the properties to be displayed on the "Service Definition" dialog box and the "Submit Service" dialog box:

(Legend)

R: The property must be specified.

O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.

Property key

Property name

Description

I/O type

Shared

Required

OS.excelFileName

CSV file name (local)

Specifies the full path name of the CSV file where the list of servers is managed.

Input

Disabled

R

OS.Column1

Column number for the server names

Specifies the column number in the CSV file as a number from 1 through 255.

Input

Disabled

R

OS.userType

OS user type

Specify "local" or "domain" as the OS user type. This property only takes effect when the agent server is running Windows.

Input

Disabled

O

OS.listOutputFolderNameRemote_Windows

Output folder for Windows (remote)

Specifies the full path of the folder on the Windows server where the list of OS users is output. The remote file is deleted after the transfer. The output folder must be specified if the servers where the user list is acquired include a Windows server.

Input

Disabled

O

OS.listOutputDirectoryNameRemote_Linux

Output directory for Linux (remote)

Specifies the full path of the folder on the Linux server where the list of OS users is output. The remote file is deleted after the transfer. The output folder must be specified if the servers where the user list is acquired include a Linux server.

Input

Disabled

O

OS.listOutputFolderNameLocal

Output folder name (local)

Specifies the full path name of the file where the list of OS users is output.

Input

Disabled

R

The following shows the list of the properties to be displayed in the "Task Details" dialog box only:

Property key

Property name

Description

I/O type

Shared

common.taskResult

Results of repeating tasks

This property contains the results of each task (as "true" or "false"), in a comma-delimited format.

Output

Disabled

The following shows the list of properties used as variables for work to inherit the value in the processing. This property is displayed only in the task log.

Property key

Property name

Description

I/O type

Shared

common.hostNameList

Server names from which user lists are acquired by batch

Specifies the list of server names from which the user lists are to be acquired by batch.

Variable

Disabled

common.osKind1

OS type 1

A work property used to store the OS type of monitor server.

Variable

Disabled

The following shows the restrictions on inputs to the property displayed on the "Service Definition" dialog box and the "Submit Service" dialog box:

Property key

Characters that can be input

OS.excelFileName

A character string of no more than 256 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

OS.Column1

Only numbers can be entered.

OS.userType

Select one of the following values:

local,domain

OS.listOutputFolderNameRemote_Windows

A character string of no more than 248 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

OS.listOutputDirectoryNameRemote_Linux

A character string of no more than 256 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, `, or a trailing \.

OS.listOutputFolderNameLocal

A character string of no more than 248 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

Flow specification details

The following table shows the detailed specification of the flow:

Hierarchy

Display name

Plug-in

Plug-in name

Version

Description

Error recovery method

1

osReadSpreadSheet

Get CSV data

01.12.00

Acquires a list of host names or IP addresses of Windows or Linux servers from a CSV file.

Eliminate the cause of the error, and then re-execute the service.

2

osShowUsersAllLoop

Repeated-execution plug-in

01.00.00

Acquires lists of OS users iteratively from the acquired host names.

Eliminate the cause of the error, and then re-execute the service.