![]() ![]() |
||
![]() Member Support ~ Linux Admin User Guide ~ Restricting Access 1. Execute the following command: $ htpasswd -c /home/username/htusers martin where: -c : New file, only use at first time. /home/username/ : the directory of the password file located. htusers : the password file, you may choose any name you like. martin : username The -c argument tells htpasswd to create new users file. When you run this command, you will be prompted to enter a password for martin, and confirm it by entering it again. Other users can be added to the existing file in the same way, except that the -c argument is not needed. The same command can also be used to modify the password of an existing user. After adding a few users, the /home/username/htusers file might look like this:
The first field is the username, and the second field is the encrypted password.
The first directive, AuthName, specifies a realm name for this protection. Once a user has
|
||
![]() |
||
Room 1619, Fortune Commercial Building, 362 Sha Tsui Road, Tsuen Wan,
N.T. Tel: (852) 2409-8602 Fax: (852) 2408-8632 E-mail: info@unisite.net |