blob: 8ee8b8601c4673fa39de1a4fc2645f632beadb24 [file] [log] [blame]
type=page
status=published
title=create-password-alias
next=create-profiler.html
prev=create-node-ssh.html
~~~~~~
= create-password-alias
[[create-password-alias-1]][[GSRFM00049]][[create-password-alias]]
== create-password-alias
Creates a password alias
[[sthref472]]
=== Synopsis
[source]
----
asadmin [asadmin-options] create-password-alias [--help]
aliasname
----
[[sthref473]]
=== Description
The `create-password-alias` subcommand creates an alias for a password.
An alias is a token of the form `${ALIAS=aliasname}`. The password that
corresponds to the alias name is stored in an encrypted form.
The `create-password-alias` subcommand can be run interactively or
noninteractively.
* When run interactively, the subcommand prompts the user for the alias
password and to confirm the alias password.
* When run noninteractively, the subcommand reads the alias password
from a file that is passed through the `--passwordfile` option of the
link:asadmin.html#asadmin-1m[`asadmin`(1M)] utility. The file must
contain an entry of the form `{cprefix}ALIASPASSWORD=`alias-password,
where alias-password is the alias password. The noninteractive form of
this command is suitable for use in scripts.
This subcommand is supported in remote mode only.
[[sthref474]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
[[sthref475]]
=== Operands
aliasname::
Your choice of name for the password alias.
[[sthref476]]
=== Examples
[[GSRFM515]][[sthref477]]
==== Example 1   Creating a Password Alias Interactively
This example creates the password alias `jmspassword-alias`
interactively.
[source]
----
asadmin> create-password-alias jmspassword-alias
Enter the alias password>
Enter the alias password again>
Command create-password-alias executed successfully.
----
[[GSRFM830]][[sthref478]]
==== Example 2   Creating a Password Alias Noninteractively
This example uses the `--passwordfile` option of the `asadmin` utility
to create the password alias `winuser` noninteractively.
[source]
----
$ asadmin --passwordfile aspwfile.txt create-password-alias winuser
Command create-password-alias executed successfully.
----
The file `aspwfile.txt` contains the following entry to specify the
alias password:
[source]
----
AS_ADMIN_ALIASPASSWORD=sp@rky
----
[[sthref479]]
=== Exit Status
0::
command executed successfully
1::
error in executing the command
[[sthref480]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:delete-password-alias.html#delete-password-alias-1[`delete-password-alias`(1)],
link:list-password-aliases.html#list-password-aliases-1[`list-password-aliases`(1)],
link:update-password-alias.html#update-password-alias-1[`update-password-alias`(1)]