httpd.conf,更改为禁用身份验证
我该如何修改 httpd.conf 的这一部分,以便即使我丢失了密码也可以访问它。
AliasMatch ^/mydisk/(.*) "/links/webdav/$1"
<Directory "/links/webdav">
Options +SymLinksIfOwnerMatch
DAV On
#deprecated in httpd-2.0 DAVParam Hide Email;.htaccess
AllowOverride None
AuthName "mydisk"
AuthType Basic
require valid-user
AuthSQLiteGroupTable /dev/null
AuthSQLiteGroupField /dev/null
AuthSQLiteDB /var/lib/sqlite/registration
AuthSQLiteUserTable users
AuthSQLiteNameField LoginID
AuthSQLitePasswordField Crypt
# IndexIgnore Maildir .htaccess
Satisfy all
</Directory>
当我尝试从浏览器在服务器上访问它时,我不知道登录凭据。我对服务器有完全的 root 访问权限。有什么建议吗?
How might I go about modifying this part of my httpd.conf, so that I can gain access to this even though I have lost my password.
AliasMatch ^/mydisk/(.*) "/links/webdav/$1"
<Directory "/links/webdav">
Options +SymLinksIfOwnerMatch
DAV On
#deprecated in httpd-2.0 DAVParam Hide Email;.htaccess
AllowOverride None
AuthName "mydisk"
AuthType Basic
require valid-user
AuthSQLiteGroupTable /dev/null
AuthSQLiteGroupField /dev/null
AuthSQLiteDB /var/lib/sqlite/registration
AuthSQLiteUserTable users
AuthSQLiteNameField LoginID
AuthSQLitePasswordField Crypt
# IndexIgnore Maildir .htaccess
Satisfy all
</Directory>
When I try to access it on my server from the browser I don't know the login credentials. I have full root access to the server. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来它正在使用 SQLite 进行身份验证...您应该能够在命令行中执行以下操作:
这应该会显示用户名和密码是什么。
您可以完全禁用身份验证,但由于它是 DAV,因此可能意味着任何人都可以对其进行写入。
Looks like it's using SQLite for the authentication... you should be able to do the following in the commandline:
And that should show you what the username and passwords are.
You could completely disable authentication, but since it's DAV, it could potentially mean anyone could write to it.