天天看點

Linux基礎指令---htdigest建立和更新apache伺服器摘要

htdigest

htdigest指令用來建立和更新apache伺服器用于摘要認證的存放使用者認證資訊的檔案。
  此指令的适用範圍:RedHat、RHEL、Ubuntu、CentOS。
           

1、文法

htdigest  [-c]  passfile   realm  username
           

2、參數清單

-c 
  建立密碼檔案,如果存在,首先删除
           

3、執行個體

建立摘要認證檔案

[root@localhost ~]# htdigest -c htfile qq.com weijie          //使用者weijie在qq.com的認證檔案
  Adding password for weijie in realm qq.com.
  New password:                                      //輸入密碼
  Re-type new password:                            //确認密碼
  You have new mail in /var/spool/mail/root
  [root@localhost ~]# cat htfile                 //顯示認證檔案
  weijie:qq.com:3d3feff0cf3f031cf3652349b7249d59           

繼續閱讀