3.3 Authentication Parameters

You must specify the server name and login credentials for the server where you want to manage Dynamic File Services pairs and policies. This allows you to connect to the service running on the DynamicFS server and execute the command. The authentication parameters include the server name, username, password, and port number for the server that you want to manage.

IMPORTANT:Login credentials are not required if you run a DswCli command while you are logged in as the Administrator user or a user in the Dynamic File Services group on the server. Credentials are required if you are managing the server remotely from another computer, or if you are on the server you want to manage but are logged in as a user without the privileges needed to manage Dynamic File Services.

You can specify the server name and login credentials with each command, or you can set environment variables for the parameters while you are managing the server.

3.3.1 Setting Authentication Parameters in Commands

Use the options in this section to specify the authentication parameters in each Dynamic File Services command for a server. With this method, you must provide the -servername, -username, and ‑password options for every command. You need to specify the port number for the Dynamic File Service port on the target server only if the server has been previously configured to use a port other than the default (8999).

Syntax

Specifies the authentication parameters as needed in the pair or policy command.

DswCli.exe [-servername [‑port [‑username [‑password]]]] 
        {[system_action] |
         -pair [pair_options] | 
         ‑policy [policy_options] |
         -schedule [schedule_options] | 
         -registration [registration_option] |
         -cloudproviders | 
         -cloud [cloud_options]
        } 

Authentication Parameters

This section describes the following authentication parameters:

-servername

Specifies the IP address or DNS name of the server where you want to create or manage the pair. If you are issuing commands locally on the DynamicFS server, you can also use the loopback address (127.0.0.1) instead of its assigned IP address, or you can use localhost as the server name instead of its full DNS name. The IPv4 format is supported for the IP address. DNS names are case sensitive.

Syntax

-servername={"ip_address" | "DNS_name"}

Examples

-servername="192.168.1.1"
-servername="server1.site1.example.com"
-servername="localhost"
-servername="127.0.0.1"
-port

Instead of using the configured port number, use the supplied value.

You need to specify this parameter only if you have set up the target server to use a port other than the default Dynamic File Service port (8999) for remote management communications.

If this parameter is not used and the port is not configured as an environment variable, the default port is automatically used for DynamicFS communications.

Syntax

-port=<"portnumber">

Examples

-port="1234"
-port=8999
-username, -u

Specifies the username of a user who is a member of the Dynamic File Services group (or is the Administrator user) for the DynamicFS server that you want to manage.

Syntax

-username=<"admin_user_name">

-u=<"admin_user_name">

Examples

-username="Administrator"

-u="Administrator"

-u="john"
-password, -p

Specifies the password for the user whose username you supplied.

Syntax

-password=<"admin_user_password">
-p=<"admin_user_password">

Examples

-password="novell"
-p="novell"

Authentication Examples

Example: Using the IP Address of the Server
DswCli.exe -servername=192.168.1.1 -u=Administrator -p=novell
         ‑pair

This command connects to the server via the IP address 192.168.1.1, logs in with the credentials of Administrator and novell, then lists all pairs on the specified server. You can also provide the credentials of a user who is a member of the Dynamic File Services group. It assumes that the default port is 8999.

Example: Using the DNS Address of the Server
DswCli.exe -servername=server1.site1.example.com -u=Administrator -p=novell
         -port="1234" 
         ‑policy

This command connects to the server via the DNS name of server1.site1.example.com, logs in with the credentials of Administrator and novell, then lists all policies on the specified server. You can also provide the credentials of a user who is a member of the Dynamic File Services group. It specifies that the TCP connection should be made with port 1234 on the target server, because you have previously configured the Dynamic File Service port on that server to use port 1234 instead of the default port 8999.

3.3.2 Setting Authentication Parameters as Environment Variables

Dynamic File Services allows you to use the Windows set command in the Administrator Command Prompt console to specify environment variables for the authentication parameters (server name, username, password, and port) for the server that you want to manage with commands. The environment variables are set for only one server at a time. The environment variable settings persist if you issue the set command again with different values, or until you close the console.

After the environment variables are set for a given server, the parameter values are automatically applied for every DswCli.exe command where you do not provide authentication parameters. For example, the following commands apply only to the server that has been previously set up with the environment variables:

DswCli.exe -pair
DswCli.exe -policy

You can change the environment variables settings by issuing the set commands again with the new values.

IMPORTANT:You can remove the environment variable settings by closing the Administrator Command Prompt console.

If it is used without parameters, the set command displays the current environment variable settings.

The Dynamic File Services environment variables for the set command are:

Environment Variable

Description

DswParm1=<servername>

Specifies the servername by providing the DNS address or the IP address of the server you want to manage.

Examples

The following command sets the environment variable for servername to 192.168.1.1:

set DswParm1=192.168.1.1

The following command displays the current setting for the DswParm1 environment variable:

set DswParm1

DswParm2=<username>

Specifies the username of the user identity you want to use to manage the server. The user must be a member of the Dynamic File Services group (or the Administrator user) on the server.

Examples

The following command sets the environment variable for username to Administrator. You can also provide the credentials of a user who is a member of the Dynamic File Services group.

set DswParm2=Administrator

The following command displays the current setting for the DswParm2 environment variable:

set DswParm2

DswParm3=<password>

Specifies the password of the user identity you specified with DswParm2.

Examples

The following command sets the environment variable for password to novell:

set DswParm3=novell

The following command displays the current setting for the DswParm3 environment variable:

set DswParm3

DswParm4=<portnumber>

Specifies the portnumber to use for DynamicFS communications with the server you want to manage.

You need to specify this parameter only if you have set up the target server to use a port other than the default Dynamic File Service port for remote management communications. The default port value is automatically assumed if this parameter is not otherwise specified.

Examples

The following command sets the environment variable for portnumber to 1234:

set DswParm4=1234

The following command displays the current setting for the DswParm4 environment variable:

set DswParm4

To use environmental variables while executing Dynamic File Services commands:

  1. On a Windows server or workstation where Dynamic File Services is installed, open the Administrator Command Prompt console.

  2. At the command prompt, specify the server name and login credentials for the server that you want to manage by entering the following commands as needed:

    set DswParm1=192.168.1.1
    
    set DswParm2=Administrator
    
    set DswParm3=password
    
    set DswParm4=1234
    

    Make sure to change the values to the credentials needed to log in to the server you want to manage.

  3. At the command prompt, enter the DswCli.exe commands to manage pairs and policies on the specified server.

    You can specify the commands without providing credentials.

  4. Repeat Step 3 for all of the DswCli.exe commands you want to issue for that server.

  5. When you are done, repeat Step 2 to Step 4 for each server you want to manage.

  6. Close the console to remove the credentials as environmental variables.