htpasswd命令 Published on Jul 19, 2024 in 随笔 with 0 comment 实例1: 创建一个新的文件,并设置密码和用户,交互式 [root@test ~]# htpasswd -c /tmp/htpasswd linux New password: Re-type new password: Adding password for user linux [root@test ~]# cat /tmp/htpasswd linux:$apr1$3VhLd1HR$uSkhBgwIGYFDY5lWzZZsM0 实例2: 添加一个新用户到配置文件中,非交互式创建密码 [root@test ~]# htpasswd -b /tmp/htpasswd baodian 321 Adding password for user baodian [root@test ~]# cat /tmp/htpasswd linux:$apr1$3VhLd1HR$uSkhBgwIGYFDY5lWzZZsM0 baodian:$apr1$ApIm66k6$CpqxwyqMUq.ZbcmMVELu10 实例3: 删除一个指定的用户 [root@test ~]# htpasswd -D /tmp/htpasswd linux Deleting password for user linux [root@test ~]# cat /tmp/htpasswd baodian:$apr1$ApIm66k6$CpqxwyqMUq.ZbcmMVELu10 本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可。本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。