简体   繁体   English

Mediawiki,密码更改后无法登录

[英]Mediawiki, can't login after password change

I'm using MediaWiki 1.27.0 on Ubuntu 14.04 我在Ubuntu 14.04上使用MediaWiki 1.27.0

I haven't set up email on the server yet, so I was going to reset a users password using the maintenance/changePassword.php script that mediawiki provides. 我尚未在服务器上设置电子邮件,因此我将使用mediawiki提供的maintenance/changePassword.php脚本来重置用户密码。

When I ran their command 当我执行他们的命令时

php maintenance/changePassword.php --conf=/var/www/html/LocalSettings.php --user=myuser --password=newPassword

It said Password set for myuser 它说为我的Password set for myuser

Now no one can log in, and everyone gets the same error of 现在没有人可以登录,每个人都遇到相同的错误

There seems to be a problem with your login session; 您的登录会话似乎有问题; this action has been canceled as a precaution against session hijacking. 为了防止会话劫持,该操作已被取消。 Go back to the previous page, reload that page and then try again. 返回上一页,重新加载该页面,然后重试。

I'm at a loss as to how to fix this. 我对如何解决这个问题不知所措。 I find other's who have had this error with an older version of mediawiki, and the next version of mediawiki seems to have fixed their problem. 我发现其他人使用较旧版本的mediawiki出现此错误,而下一版本的mediawiki似乎已解决了他们的问题。 But obviously, that can't fix this issue. 但这显然不能解决此问题。

Any help is appreciated. 任何帮助表示赞赏。


What I've tried 我尝试过的

I looked through the user accounts in the database to make sure their change password script hadn't done anything odd, and it all looks fine. 我查看了数据库中的用户帐户,以确保他们的更改密码脚本没有做任何奇怪的事情,并且一切正常。

I tried this crazy solution that said you should create a tmp directory in the root of mediawiki and give it 777 access. 我尝试了这个疯狂的解决方案 ,说您应该在mediawiki的根目录中创建一个tmp目录,并为其提供777访问权限。 I tried that, just for giggles, then deleted the directory. 我只是为了咯咯地笑了,然后删除了目录。

EDIT 编辑

This isn't the solution. 这不是解决方案。 After restarting apache2, I was able to login, but the same problem happened again. 重新启动apache2之后,我可以登录,但是同样的问题再次发生。 I'm not sure what happened yet, but this definitely didn't resolve the problem more than just temporarily. 我不确定发生了什么,但这绝对不能解决问题,而不仅仅是暂时解决问题。


I was going to delete this question, but I think it's only a matter of time before it actually helps some noob like me. 我本来打算删除这个问题,但是我认为这实际上对像我这样的菜鸟有所帮助只是时间问题。

The instructions on manually resetting the mediawiki passwords without email don't say that you should restart apache once you have run the script, but this seems to be required. 关于不通过电子邮件手动重设mediawiki密码的说明并没有说运行脚本后应重新启动apache,但这似乎是必需的。 That should have been my first step, but I started freaking out, and everything I knew to do went straight out the window. 那本来应该是我的第一步,但是我开始吓坏了,而我所知道要做的一切都直奔窗外。

So, if you manually reset passwords on mediawiki, and you get this error, restart apache. 因此,如果您在mediawiki上手动重置密码,却收到此错误,请重新启动apache。 Actually, if you ever get an error for any reason....this is probably a good thing to try anyway. 实际上,如果您因任何原因而遇到错误...。无论如何,这可能都是一件好事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM