htpasswd命令详解
htpasswd参数
-c 创建passwdfile.如果passwdfile 已经存在,那么它会重新写⼊并删去原有内容.
-n 不更新passwordfile,直接显⽰密码
-m 使⽤MD5加密(默认)
-d 使⽤CRYPT加密(默认)
-p 使⽤普通⽂本格式的密码
-s 使⽤SHA加密
-b 命令⾏中⼀并输⼊⽤户名和密码⽽不是根据提⽰输⼊密码,可以看见明⽂,不需要交互
-D 删除指定的⽤户linux修改口令的命令
verilog软件实例
java数组比较大小
1. 如何利⽤htpasswd命令添加⽤户?
# /usr/local/apache/bin/htpasswd -bc linuxeye_pd linuxeye_user linuxeye_password
特效制作中心
Adding password for user linuxeye_user
# cat linuxeye_pd
linuxeye_user:$apr1$Mugpp3FE$zGsi7/JfQIhFXPlgqo/Wx/
⽣成当前⽬录下⽣成⼀个linuxeye_pd⽂件,⽤户名linuxeye_user,密码:linuxeye_password,默认采⽤MD5加密⽅式2. 如何在原有密码⽂件中增加下⼀个⽤户?
# /usr/local/apache/bin/htpasswd -b linuxeye_pd linuxeye linuxeye
Adding password for user linuxeye
# cat linuxeye_pd
linuxeye_user:$apr1$Mugpp3FE$zGsi7/JfQIhFXPlgqo/Wx/
linuxeye:$apr1$/8EUOPYI$4MBxYpzotrSDcTTDZvTeT0
⼀定要去掉-c选项,否则覆盖密码⽂件再创建
3. 如何不更新密码⽂件,只显⽰加密后的⽤户名和密码?
# /usr/local/apache/bin/htpasswd -n linuxeye
New password:
Re-type new password:
linuxeye:$apr1$bZ6Gclc4$zKRap.0BADzZIxLoxpDNv0
# /usr/local/apache/bin/htpasswd -nb linuxeye linuxeye_password
linuxeye:$apr1$yvngdKGV$QrnlriJ.MxIu52Vmo.ROE1
4. 如何利⽤htpasswd命令删除⽤户名和密码?
# /usr/local/apache/bin/htpasswd -D linuxeye_pd linuxeye_user
Deleting password for user linuxeye_user
# cat linuxeye_pd
linuxeye:$apr1$/8EUOPYI$4MBxYpzotrSDcTTDZvTeT0
5. 如何利⽤htpasswd命令修改密码?
ckeditor5 vue# /usr/local/apache/bin/htpasswd -D linuxeye_pd linuxeye
Deleting password for user linuxeye
# /usr/local/apache/bin/htpasswd -b linuxeye_pd linuxeye linuxeye_passwd
Adding password for user linuxeye
weblogic漏洞如何修复# cat linuxeye_pd
linuxeye:$apr1$74ZvB1vC$/b7ETmg8xhDPieYj0b0cE.
需要先利⽤htpasswd命令删除指定⽤户,再利⽤htpasswd添加⽤户命令创建⽤户即可实现修改密码的功能。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。