# Use the-c option to regenerate the file specified by the option
[Root @ localhost conf] # htpasswd-c htpasswd. user aaa
New password:
Re-type new password:
Adding password for user aaa
[Root @ localhost conf] # cat htpasswd. user
Aaa: Bb5sDJ18YXP ..
[Root @ localhost conf] # htpasswd-cb htpasswd. user bbb
Adding password for user bbb
[Root @ localhost conf] # cat htpasswd. user
Bbb: jOmE6lLI7g45M
# The following two methods are recommended for adding users:
[Root @ localhost conf] # htpasswd-n ccc> htpasswd. user
New password:
Re-type new password:
[Root @ localhost conf] # cat htpasswd. user
Bbb: jOmE6lLI7g45M
Ccc: mAqD. htApgYNM
Empty row
[Root @ localhost conf] # htpasswd-nb ddd> htpasswd. user
[Root @ localhost conf] # cat htpasswd. user
Bbb: jOmE6lLI7g45M
Ccc: mAqD. htApgYNM
Empty row
Ddd: uAb7o0aUwD5pg
Empty row
This article from the "notepad" blog, please be sure to keep this source http://sndapk.blog.51cto.com/5385144/1295260