Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


3.2.1 htpasswd

The htpasswd command registers the user name and password in the password file, and changes the password.

Synopsis

htpasswd [-b] [-c|-D] password-file-name user-name [password]

Storage location

Application Server installation directory/httpsd/sbin

Function

Registers a user name and password in the password file. You can change the password or delete a user name registered in the password file.

Execution permission

Superuser

Arguments

-b

Specify this parameter when you specify the password in the command line.

-c

Specify this parameter when you create a new password file. You need not specify -c when you add a user and change the password in an already created password file.

-D

Specify this parameter when you delete a user registration. If the specified user is registered in the specified password file, the utility deletes the corresponding user from the password file.

password-file-name

Specify the password file that registers, changes, or deletes password.

user-name

Specify the user name for which password is to be registered, changed, or deleted.

password

Specify the password to be registered or changed. You can specify this parameter only when -b option is specified.

Examples

If you specify the password file name, the user name to be registered, or the user name for which the password is to be changed, and run the htpasswd, the input of respective password is requested. If you enter the password twice, including the confirmation of password entry, the user name and the password of that user are registered in the password file:

$ "Application Server installation directory/httpsd/sbin/htpasswd" .passwd userxx ...1.
New password:                    ...2.
Re-type new password:            ...3.
Adding password for user userxx  ...4.
$
  1. Change the password of userxx

  2. Enter a new password

  3. Re-enter the new password

  4. End the registration of new password

When deleting the registration, start the htpasswd utility by specifying the -D option, the password file name, and the user name that is to be deleted.

$ "Application Server installation directory/httpsd/sbin/htpasswd" -D .passwd userxx ...1.
Deleting password for user userxx    ...2.
$
  1. Delete registration of userxx

  2. Delete the registration of userxx and exit

Exit Status

Exit Status

Explanation

0

command executed successfully.

Other than 0

error in executing the command.

Notes