Nagios编译安装之配置Apache服务(1)(3)
9.添加htpasswd.user用户
我添加了一个kanecruise用户,口令是123456。
[root@KCentOS5C ~]# htpasswd -m /usr/local/nagios/etc/htpasswd.user kanecruise
------------------------------------------------------------
New password: 123456
Re-type new password: 123456
Adding password for user kanecruise
------------------------------------------------------------
10.察看htpasswd的使用方法,这里我就解释一些比较重要和常用的。
[root@KCentOS5C ~]# htpasswd
-------------------------------------------------------------
Usage:
htpasswd [-cmdpsD] passwordfile username
htpasswd -b[cmdpsD] passwordfile username password
htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
建立新的帐户库文件。
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password.
添加一个MD5口令加密的新用户。
-d Force CRYPT encryption of the password (default).
-p Do not encrypt the password (plaintext).
添加一个口令不加密的新用户。
-s Force SHA encryption of the password.
添加一个SHA口令加密的新用户。
-b Use the password from the command line rather than prompting for it.
-D Delete the specified user.
删除一个指定的用户
On Windows, NetWare and TPF systems the '-m' flag is used by default.
在Windows、NetWare以及TPF这些操作系统中“-m”参数(启用MD5对口令加密)是默认使用的
On all other systems, the '-p' flag will probably not work.
在其他的所有操作系统中“-p”(不对口令启用加密)参数将可能会引起失败。
-------------------------------------------------------------
11.检查htpasswd帐户文件
[root@KCentOS5C ~]# cat /usr/local/nagios/etc/htpasswd.users
-------------------------------------------------------------
kanecruise
apr1$Qwk9h/..$HaRakpabADGZL10dwPcrx1
-------------------------------------------------------------
用户添加正确,并且口令都以MD5的方式加密了。
通过文章的详细介绍,我们又学会了Nagios里的Apache服务配置!
- Nagios的配置文件
- Nagios插件plugins配置和安装
- 编译Nagios程序
- nagios服务配置
- CentOS环境Nagios的安装与配置
- 使用nagios监控oracle 10g
- 你应该知道的Nagios技巧
评论暂时关闭