Sun Desktop Manager 1.0 Administration Guide

Login

Stores the username and password for the datastore back end after a successful authentication to this datastore. This username and password can then be used in future invocations of pgtool.

The credentials are stored in a file named .apocpass in the administrator's home directory. If this file already exists and it does not have the correct permissions, then the command exits with an error.

If a username is specified, the administrator is prompted for a password, otherwise the administrator is prompted for a username and a password. The username and password are authenticated using anonymous access to the datastore. If anonymous access is not supported, then the administrator is prompted to enter an authorized username and a password. If authentication by the authorized username fails, then the command exits with an error.

Once authenticated, the username/password pair entry is stored in the administrator's .apocpass file using a key made up of a combination of the host/port/base DN and the username so that username/password pairs can be stored for other back ends in the same file.

The bootstrapping information can be specified in the command using the --file option to indicated the file where this information is found, or using the --url option to directly specify this information. For more information about boostrapping, see Bootstrapping Information Required by the CLI

If bootstrapping information is not available or the credentials file cannot be created, then the command exits with an error.

If the credentials file is successfully created, then it is not necessary to specify username and password for subsequent pgtool commands using this storage back end. The username and password details stored in the credentials file are used.

Syntax

login [--username=<username>] [--file=<bootstrap file>] [--url=<url>]

--username=<username> : the username of the administrator in the format used by the storage back end, for example “jmonroe”.

--file=<bootstrap file> : fully qualified path to a bootstrapping file. The default file is $HOME/pgtool.properties. This option is not compatible with the --url option.

--url=<url> : the URL identifying the datastore. The URL format is ldap://<hostname>:<port>/<base name> with <hostname> the name of the server (default is localhost), <port> the port number on the server (default is 389) and <base name> the distinguished name of the base entry.


Example 3–7 Login

% pgtool login --username=jmonroe [Enter the correct password when prompted]

A file called ~/.apocpass created with entry for “jmonroe” and “password”, file has permissions 600. The information about the back end to connect to is found in the default boostrapping file ~/pgtool.properties