我在系统上设置了Bugzilla服务器,并意外丢失了登录名。我已经对此进行了研究,但到目前为止没有任何效果。我尝试做的事情是:

我尝试使用MySQL界面添加更多管理用户。从命令行运行“ mysql”,并使用以下命令:

mysql> use bugs;<br />
mysql>  update profiles set groupset=0x7ffffffffffffff where login_name = "admin";<br />


我收到一条错误消息:

ERROR 1054 (42S22): Unknown column 'groupset' in 'field list'


我还找到了我用于管理员注册的电子邮件,但无法找回密码:

mysql> select login_name from profiles where userid=1;
+-------------------+
| login_name        |
+-------------------+
| admin@example.com |
+-------------------+
1 row in set (0.00 sec)


每当我尝试删除超级用户时,我都会得到以下信息:

mysql> delete from  profiles where userid=1;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`bugzilla`.`components`, CONSTRAINT `fk_components_initialowner_profiles_userid` FOREIGN KEY (`initialowner`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE)
mysql> update profiles set groupset=0x7ffffffffffffff where login_name = "(user's login name)";


我使用更改了密码

sudo checksetup.pl --reset-password=admin@example.com


尝试登录到本地Bugzilla
用户ID:admin@example.com
密码:(我的密码)

我收到以下内部错误:

Bugzilla has suffered an internal error. Please save this page and send it to admin@example.com with details of what you were doing at the time this message appeared.

There was an error sending mail from 'bugzilla-daemon' to 'admin@example.com': Couldn't find 'sendmail' executable in your PATH and $Email::Send::Sendmail::SENDMAIL is not set
Traceback:

 at Bugzilla/Mailer.pm line 190
    Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/Token.pm line 307
    Bugzilla::Token::Cancel(...) called at Bugzilla/Token.pm line 323
    Bugzilla::Token::DeletePasswordTokens(...) called at Bugzilla/Auth/Verify/DB.pm line 85
    Bugzilla::Auth::Verify::DB::check_credentials(...) called at Bugzilla/Auth/Verify/Stack.pm line 62
    Bugzilla::Auth::Verify::Stack::check_credentials(...) called at Bugzilla/Auth.pm line 72
    Bugzilla::Auth::login(...) called at Bugzilla.pm line 345
    Bugzilla::login(...) called at /var/www/bugzilla/index.cgi line 40


有办法更改用户名吗?

到目前为止没有任何工作。如何登录Bugzilla?谢谢

最佳答案

您可以使用checksetup.pl script来做到这一点。

checksetup.pl --reset-password=admin@example.com`

10-07 19:01
查看更多