blob: 7ea76ea8528debae8a6a3afa634b1fe6f5fc5782 [file] [log] [blame]
type=page
status=published
title=create-file-user
next=create-http.html
prev=create-domain.html
~~~~~~
= create-file-user
[[create-file-user-1]][[GSRFM00024]][[create-file-user]]
== create-file-user
Creates a new file user
[[sthref219]]
=== Synopsis
[source]
----
asadmin [asadmin-options] create-file-user [--help]
[--authrealmnameauth_realm_name]
[--target target
[--groups user_groups[:user_groups]*] user_name
----
[[sthref220]]
=== Description
The `create-file-user` subcommand creates an entry in the keyfile with
the specified username, password, and groups. Multiple groups can be
created by separating them with a colon (`:`). If auth_realm_name is not
specified, an entry is created in the keyfile for the default realm. If
auth_realm_name is specified, an entry is created in the keyfile using
the `auth_realm_name`.
You can use the `--passwordfile` option of the
link:asadmin.html#asadmin-1m[`asadmin`(1M)] command to specify the
password for the user. The password file entry must be of the form
`AS_ADMIN_USERPASSWORD=`user-password.
If a password is not provided, this subcommand fails if secure
administration is enabled and the user being created is an
administrative user.
This subcommand is supported in remote mode only.
[[sthref221]]
=== 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.
`--target`::
This is the name of the target on which the command operates. The
valid targets are config, instance, cluster, or server. By default,
the target is the server.
`--groups`::
This is the group associated with this file user.
`--authrealmname`::
The name of the realm in which the new user is created. If you do not
specify this option, the user is created in the "file" realm.
[[sthref222]]
=== Operands
user_name::
This is the name of file user to be created.
[[sthref223]]
=== Examples
[[GSRFM475]][[sthref224]]
==== Example 1   Creating a User in the File Realm
This example creates a file realm user named `sample_user`. It is
assumed that an authentication realm has already been created using the
`create-auth-realm` subcommand.
[source]
----
asadmin> create-file-user
--groups staff:manager
--authrealmname auth-realm1 sample_user
Command create-file-user executed successfully
----
[[sthref225]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref226]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-auth-realm.html#create-auth-realm-1[`create-auth-realm`(1)],
link:delete-file-user.html#delete-file-user-1[`delete-file-user`(1)],
link:list-file-groups.html#list-file-groups-1[`list-file-groups`(1)],
link:list-file-users.html#list-file-users-1[`list-file-users`(1)],
link:update-file-user.html#update-file-user-1[`update-file-user`(1)]