Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

1.4.2 swrba_uaimport (User Information Import Command)

Description

This command imports user account information of servers to CMDB. The input file format is CSV format.

Used in combination with swrba_uaexport (user information export command), user account information that has already been registered can be extracted from CMDB, edited, and re-imported, and the user account information can then be updated/added.

Synopsis

swrba_uaimport -f input file name [-e input file character code]

Options

-f input file name

Specifies the input file (CSV format) in which user account information of the registration target server has been defined.


Input file examples are shown below.

"192.168.0.1","OS","user001","xe3539caeb","true","false",,"Comment A"

"192.168.0.1","OS","user002","ex3535akft","false","true",,"Comment tB"

"192.168.0.2","OS","user001","xe359jsg35","true","false",,"Comment C"

"192.168.0.2","OS","user002","djh847wag4","false","true",,"Comment D"


The CSV format spec is shown below.

  • Columns are separated using commas (,).

  • If the data contains commas (,) and double-quotes (), then all the data that is specified in the column is enclosed in double-quotes (). Additionally, if the data contains double-quotes (), then the double-quotes () are described twice in succession. By describing a double-quote () twice in succession, it will be represented as one double-quote ().

    Example 1: When a comma (,) is specified (In this example, a comma (,) is contained in last column as Comment,D.)

    "192.168.0.2","OS","user002","djh847wag4","false","true",," Comment,D"

    Example 2: When a double-quote () is specified (In this example, a double-quote () is contained in the last column as CommentD.)

    "192.168.0.2","OS","user002","djh847wag4"," false","true",,"CommentD """

  • To describe a default value, specify an empty character string using one of the formats shown below.

    Example 1: Nothing is described between the separator character commas (,). (In this example, the default value is specified in the last two columns)

    "192.168.0.2","OS","user002","djh847wag4","false","true",,

    Example 2: Nothing is described between the enclosed character double-quotes (). ((In this example, the default value is specified in the last two columns)

    "192.168.0.2","OS","user002","djh847wag4","false","true","",""

  • Line feed characters cannot be entered in the column data.


The CSV format column positions are shown below.

Column 1

Column 2

Column 3

Column 4

Column 5

Column 6

Column 7

Column 8

Item

Server IP address

Authentication destination type

User

Password

Administrator user

Server connection user

Connection destination information

Comment

Example

192.168.0.1

OS

user001

xe3539caeb

true

False

Comment A

The definition rules for each column are shown below.

Column

Item

Can omit or not

Default Value

Input Content

Content that is Checked

Conditions

1

IP address

Not possible

-

Specify the server IP address.

Number of characters that can be entered

Between 1 and 255 characters

Character set

Letters of the alphabet (case-sensitivity is used), numbers, symbols

Content

If the specified IP address LogicalServer-CI has not been registered in CMDB, an error will occur

2

Authentication destination type

Not possible

-

Specify the authentication destination type.

OS must be specified.

Nothing else can be specified except OS.

Number of characters that can be entered

Between 1 and 255 characters

Character set

Letters of the alphabet (case-sensitivity is used), numbers

3

User

Not possible

-

Specify the user account for the authentication destination.

Number of characters that can be entered

Between 1 and 255 characters

Character set

- Letters of the alphabet

- Blank spaces cannot be specified

Uniqueness

The same user cannot be registered more than once in the corresponding server

4

Password

Possible

-

Specify the password character string for the user.

If the password character string is omitted, the behavior will be as shown below.

  • When new user account information is registered: This item cannot be omitted. Registration of the user account information will fail.

  • When registered user account information is updated: The password is not changed.

Number of characters that can be entered

Between 1 and 255 characters

5

Administrator user

Not possible

-

Administrator user: true

All other cases: false

Uniqueness

Multiple users cannot be registered as the administrator user in the corresponding server

Character set

Letters of the alphabet (case-sensitivity is not used)

Content

Any character string except true/false will result in an error

6

Server connection user

Not possible

-

User that connects to the server: true

All other cases: false

Uniqueness

Multiple users cannot be registered as the server connection user in the corresponding server

Character set

Letters of the alphabet (case-sensitivity is not used)

Content

Any character string except true/false will result in an error

7

Connection destination information

Possible

Empty

Only default values can be specified

Any value except a default value that is specified will result in an error.

Number of characters that can be entered

See Input content.

Character set

See Input content.

8

Comment

Possible

Empty

None

Number of characters that can be entered

Between 0 and 255 characters

Character set

The content is not checked

Remarks:

If the user account information that was entered in the input file contains an error, the importing of this user account information (but no other) will fail. Other user account information will be imported.

-e Input file character code

Specifies the input file character code. The following character codes can be specified:

  • UTF-8

  • SJIS

  • EUC

If this option is omitted, the character code of the input file will be as follows:

[Windows]

SJIS

[Linux]

The character code specified in the LANG environment variable

If the LANG environment variable has not been set, or LANG variable has been set other than ja_JP.euc or ja_JP.UTF-8 or ja_JP.SJIS or ja_JP.WINDOWS-31J, then UTF-8 will be used.

Return Values

0:

Normal termination

1:

Termination following a warning

  • There is user account information for which the import failed

2:

Parameter error

3:

An error other than the above 1 or 2

Error Content Notification

If the imported information contains an error, the error content is notified in standard error output.

Refer to the error information that was output in standard error output to correct the input data for the user account information for which the import failed, and then re-execute the command to import the user account information.

Example: If the error occurs on multiple lines, then these multiple lines will be notified.

> swrba_uaimport -f importcsv.txt
Error: Failed to register the user. Detail=The registration destination LogicalServer[192.168.0.1] cannot be found.
Error: Failed to register the user. Detail=The registration destination LogicalServer[192.168.0.2] cannot be found.
User was successfully registered. LogicalServer=192.168.10.10 User=user001
User was successfully registered. LogicalServer=192.168.10.10 User=user002
Failed to execute all or part of the processing.

Command Location

[Windows]

<Systemwalker Runbook Automation installation directory>\bin
Note: The default location is C:\Fujitsu\Systemwalker\SWRBAM

[Linux]

/opt/FJSVswrbam/bin


Privilege Required/Execution Environment

[Windows]

[Linux]

Note