Admin Login Configuration

403 views
Skip to first unread message

wex

unread,
Sep 16, 2008, 3:41:01 PM9/16/08
to reviewboard
How do I configure the admin login?

I get invalid username/password messages every time I try to log in to
the reviewboard/admin page.

I'm using a MySQL database on a Windows XP server. I've tried lots of
different values in the settings.py ADMIN field, but I can't get it to
work. What values go in the settings.py ADMIN field? Are there other
configuration settings I need to change to get my admin accounts set
up?

I can log in to my MySQL command line client. Checking the status in
MySQL indicates that I'm logged in with the Current user set to
"root@localhost"

Apologies, I know next to nothing about MySQL.

Thanks,

Dan Wexler

Joseph Liu

unread,
Sep 16, 2008, 4:52:31 PM9/16/08
to revie...@googlegroups.com
It should be the user/pass when you set up reviewboard.

wex

unread,
Sep 16, 2008, 5:06:18 PM9/16/08
to reviewboard
The Reviewboard Getting Started guide instructions do not require a
user/pass for anything other than MySQL. I've tried that and it
doesn't work.

Is the admin password supposed to match the mysql user/pass? Do I
need to enter this information into settings.py or only in
settings_local.py?

I've tried all sorts of user/pass combinations in settings.py and with
my MySQL database. None of them work. Tips appreciated!

On Sep 16, 1:52 pm, "Joseph Liu" <fros...@gmail.com> wrote:
> It should be the user/pass when you set up reviewboard.
>

wex

unread,
Sep 16, 2008, 5:18:51 PM9/16/08
to reviewboard
Is there any log file I can examine to try and debug this admin login
issue?

David Trowbridge

unread,
Sep 16, 2008, 5:50:59 PM9/16/08
to revie...@googlegroups.com
When you run './manage.py syncdb', it should ask you for a username
and password for the admin.

-David

wex

unread,
Sep 16, 2008, 5:57:45 PM9/16/08
to reviewboard
I was never prompted for a user/pass by "manage.py syncdb"

Once I entered the mysql user name and password into
settings_local.py, I re-ran "manage.py syncdb" and it seemed to work
ok, but never prompted for a password. When I run the same command
now, I get:

dfilm@maki /c/reviewboard > ./manage.py syncdb
Installing json fixture 'initial_data' from 'c:\reviewboard\scmtools
\fixtures'.
Installed 6 object(s) from 1 fixture(s)

When I try to use the user/pass from the settings_local.py, to log in
to the reviewboard admin site, it rejects me.

When I look at the "reviewboard" database in mysql, it seems to be
properly populated:

mysql> use reviewboard;
Database changed
mysql> show tables
-> ;
+-------------------------------------------------+
| Tables_in_reviewboard |
+-------------------------------------------------+
| accounts_profile |
| accounts_profile_starred_groups |
| accounts_profile_starred_review_requests |
| accounts_reviewrequestvisit |
| auth_group |
| auth_group_permissions |
| auth_message |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| diffviewer_diffset |
| diffviewer_diffsethistory |
| diffviewer_filediff |
| django_admin_log |
| django_content_type |
| django_evolution |
| django_project_version |
| django_session |
| django_site |
| reviews_comment |
| reviews_defaultreviewer |
| reviews_defaultreviewer_groups |
| reviews_defaultreviewer_people |
| reviews_group |
| reviews_group_users |
| reviews_review |
| reviews_review_comments |
| reviews_review_screenshot_comments |
| reviews_reviewrequest |
| reviews_reviewrequest_inactive_screenshots |
| reviews_reviewrequest_screenshots |
| reviews_reviewrequest_target_groups |
| reviews_reviewrequest_target_people |
| reviews_reviewrequestdraft |
| reviews_reviewrequestdraft_inactive_screenshots |
| reviews_reviewrequestdraft_screenshots |
| reviews_reviewrequestdraft_target_groups |
| reviews_reviewrequestdraft_target_people |
| reviews_screenshot |
| reviews_screenshotcomment |
| scmtools_repository |
| scmtools_tool |
| siteconfig_siteconfiguration |
+-------------------------------------------------+
44 rows in set (0.00 sec)

mysql> show django_site;
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that
corresponds to your MySQL server version for the right syntax to use
near 'djan
o_site' at line 1
mysql> describe django_site;
+--------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| domain | varchar(100) | NO | | NULL | |
| name | varchar(50) | NO | | NULL | |
+--------+--------------+------+-----+---------+----------------+
3 rows in set (0.01 sec)

On Sep 16, 2:50 pm, "David Trowbridge" <trowb...@gmail.com> wrote:
> When you run './manage.py syncdb', it should ask you for a username
> and password for the admin.
>
> -David
>

wex

unread,
Sep 16, 2008, 6:09:57 PM9/16/08
to reviewboard
Aha, this looks like a Django user/pass. Browsing the django manual,
it seems as though I should run "manage.py createsuperuser",
but when I do that, it just hangs. Sigh. I'll bet that happened as I
was configuring things, and I just did a Ctrl-C to break out and fix
stuff.

Any clue as to how to debug the hang I get with "manage.py
createsuperuser"?

I guess I'll keep paging through the Django docs...

On Sep 16, 2:50 pm, "David Trowbridge" <trowb...@gmail.com> wrote:
> When you run './manage.py syncdb', it should ask you for a username
> and password for the admin.
>
> -David
>

Christian Hammond

unread,
Sep 16, 2008, 6:22:47 PM9/16/08
to revie...@googlegroups.com
I would say your best bet is to just nuke your current database and re-run syncdb. It definitely should be asking for a user/pass.

The way admins work is that you have a User entry in the database with the Superuser and Admin flags set. This allows you to log into the admin UI. The MySQL password has nothing to do with users in Review Board/Django, nor does the ADMINS line in settings.py.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

wex

unread,
Sep 16, 2008, 6:40:24 PM9/16/08
to reviewboard
Thanks. Good information. That will keep me from spending any more
time messing with my ADMINS or basic users.

I've deleted the database using the mysql command "drop database
reviewboard" and then I created it again from scratch using "create
database reviewboard" and now, when I issue "manage.py syncdb" it just
hangs (just like I got with I tried doing "manage.py
createsuperuser"). I must have something messed up in my mysql config
that is messing up the superuser creation.

If I interrupt the initial "manage.py syncdb" (after about five
minutes of it just hanging). I can see that, once again, I have a
bunch of tables in my db, but my admin stuff is still not there. I'm
pretty sure this is the same thing that happened to me the first time.

That's a bit odd, since it indicates that manage.py is able to create
tables in my database (so it has access), but something else is
preventing it from creating the admin stuff?

Hmmm.

On Sep 16, 3:22 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> I would say your best bet is to just nuke your current database and re-run
> syncdb. It definitely should be asking for a user/pass.
>
> The way admins work is that you have a User entry in the database with the
> Superuser and Admin flags set. This allows you to log into the admin UI. The
> MySQL password has nothing to do with users in Review Board/Django, nor does
> the ADMINS line in settings.py.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.

David Trowbridge

unread,
Sep 16, 2008, 6:46:30 PM9/16/08
to revie...@googlegroups.com
I don't think you even need to create the database in mysql before
running syncdb--in fact, its existence may confuse syncdb into
thinking it's not the first-time run.

-David

wex

unread,
Sep 16, 2008, 6:52:05 PM9/16/08
to reviewboard
Thanks for the tips, but still no dice.

The Getting Started docs explicitly say that you need to create a
database when using mysql (see the "Database" section). If you don't
create a database, you get the following error when running "manage.py
syncdb":

...
File "c:\reviewboard\__init__.py", line 74, in Connect
File "build\bdist.win32\egg\MySQLdb\connections.py", line 170, in
__init__
_mysql_exceptions.OperationalError: (1049, "Unknown database
'reviewboard'")


I'm not particularly married to using mysql, it was just that it was
already installed on my machine. Is all this easier with sqlite?

wex

unread,
Sep 16, 2008, 7:09:34 PM9/16/08
to reviewboard
I seem to have the same basic issue when I try to use sqlite3 instead
of mysql.

I updated settings_local.py to use sqlite3, specified the database as
"reviewboard.sqlite" and tried to run "./manage.py syncdb".

Once again it hangs. If I interrupt it, I can see that it created the
reviewboard.sqlite database in the local directory, but it never asked
me for an admin user/pass. Ugh!

Perhaps some directory is not writable or there is some other
permissions issue?

This is killing me. I'm trying to switch from using Code Collaborator
to Reviewboard, and I've now spent about 10 hours trying to get it set
up. Incredibly frustrating. I'd love to get all of NVIDIA using
reviewboard...

Sam Post

unread,
Sep 16, 2008, 7:13:13 PM9/16/08
to revie...@googlegroups.com
Just a thought, but have you tried starting from scratch? Blow away your databases, review board install, etc? Seems like you've tried just about everything else...

Just my $.02

Thanks,

Sam

Christian Hammond

unread,
Sep 16, 2008, 7:17:21 PM9/16/08
to revie...@googlegroups.com
I completely understand your frustration. This is certainly a new issue that I've not seen before. Can't imagine why syncdb would be hanging like this. How long have you given it?

Also, what version of Django do you have installed, and what OS/distro is this on? What version of Python?

When you press Control-C when doing the syncdb, does it display any backtrace information? Can you show us a complete dump of the output of your syncdb?

Installation is one of our main weak points. I'm working on getting this all simplified where you have basically two commands to get Review Board running: one for installing Review Board and its main dependencies, and one for setting up the site/database. These aren't in yet so they won't benefit you, but just letting you know we are working on it. However, this syncdb thing seems to be pretty specific to your setup.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

wex

unread,
Sep 16, 2008, 7:49:51 PM9/16/08
to reviewboard
Good to know that we are working on improving the installation!
Hopefully I can help debug some of the issues.

I just removed the entire reviewboard directory, uninstalled MySQL, re-
downloaded reviewboard from SVN, set it up to use sqlite3, and I still
see the same hang. Its been hung in the first "syncdb" for about five
minutes now.

Any tips on how to debug would be appreciated.

I'm sure this must be something specific in my machine configuration
of my XP server. I'm using an account with admin privileges and I
have write permission to all the directories. What does DJango do
when it tries to create a superuser account? Does anyone know the
specifics?

Next up for me is to find a Linux server somewhere and try this all
again. Sigh.


On Sep 16, 4:17 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> I completely understand your frustration. This is certainly a new issue that
> I've not seen before. Can't imagine why syncdb would be hanging like this.
> How long have you given it?
>
> Also, what version of Django do you have installed, and what OS/distro is
> this on? What version of Python?
>
> When you press Control-C when doing the syncdb, does it display any
> backtrace information? Can you show us a complete dump of the output of your
> syncdb?
>
> Installation is one of our main weak points. I'm working on getting this all
> simplified where you have basically two commands to get Review Board
> running: one for installing Review Board and its main dependencies, and one
> for setting up the site/database. These aren't in yet so they won't benefit
> you, but just letting you know we are working on it. However, this syncdb
> thing seems to be pretty specific to your setup.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>

wex

unread,
Sep 16, 2008, 7:55:50 PM9/16/08
to reviewboard
Sorry, forgot to answer your specific questions:

Django version: 1.0
OS: Windows XP
Python 2.5

I'm setting this up in Cygwin. I downloaded the reviewboard stuff via
the svn command directly into C:/ and I installed all of the other
requirements by following the Getting Started guide (nice and
helpful!). I upgraded from Apache 1.3 (cygwin) to Apache 2.0
(windows), but I'm not using Apache yet since I'm still having trouble
with the basic install (though I did get mod_python working, but not
mod_fastcgi).


Thanks for all the help!


Dan

On Sep 16, 4:17 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> I completely understand your frustration. This is certainly a new issue that
> I've not seen before. Can't imagine why syncdb would be hanging like this.
> How long have you given it?
>
> Also, what version of Django do you have installed, and what OS/distro is
> this on? What version of Python?
>
> When you press Control-C when doing the syncdb, does it display any
> backtrace information? Can you show us a complete dump of the output of your
> syncdb?
>
> Installation is one of our main weak points. I'm working on getting this all
> simplified where you have basically two commands to get Review Board
> running: one for installing Review Board and its main dependencies, and one
> for setting up the site/database. These aren't in yet so they won't benefit
> you, but just letting you know we are working on it. However, this syncdb
> thing seems to be pretty specific to your setup.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>

wex

unread,
Sep 16, 2008, 8:16:53 PM9/16/08
to reviewboard
Aha! I got it to work when using the regular windows command shell
instead of running inside a cygwin rxvt terminal!

When I ran manage.py syncdb in my cygwin shell, there was no output at
all. When running in a Windows command shell, I see progress about
what it is doing and then it stops and asks for my admin user/pass
just like ya'll said it would! Fancy that. I wonder why rxvt/cygwin
is an issue?

And, now, of course, I can successfully log in as an admin!

W00t!

I noticed another anomoly that only happens when I run from a cygwin/
rxvt shell: When I start manage.py runserver, it creates two python
processes. If I Ctrl-C out of the shell, one of the processes stays
active and I have to kill it in the Task Manager. Hmmm. Could these
be related issues? I haven't tried any of this with another cygwin
shell -- just rxvt.

David Trowbridge

unread,
Sep 16, 2008, 8:20:24 PM9/16/08
to revie...@googlegroups.com
Sounds like cygwin might have a strangely broken python?

Glad you got this working!

-David

Christian Hammond

unread,
Sep 17, 2008, 3:03:31 AM9/17/08
to revie...@googlegroups.com
Awesome :)

Yeah, definitely sounds like Cygwin is busted or includes a busted Python. We'll have to make a note of it and warn people there may be problems.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


On Tue, Sep 16, 2008 at 5:16 PM, wex <danw...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages