Installation: No RT user found. Please consult yo ur RT administr ator

-----Original Message-----
From: Phil Homewood [mailto:pdh@snapgear.com]
Sent: Tuesday, July 16, 2002 9:44 PM
To: rt-users@lists.fsck.com
Subject: Re: [rt-users] Installation: No RT user found. Please consult
your RT administr ator.

Blackstone, J. David wrote:

Of course, my first response (even before checking
mailing lists) was to
just say, “I’ll accept the security risk and change the
password when I can
figure out how,” and go on with it. But I can’t seem to
log into the web
interface, either as root (with the supposed default
password of “password”
or with the password I’m trying to set), or as rt_user.
[So even if adding
users and messing around with configurations were the
appropriate action to
take at this stage, I can’t get in anyway.]

Oops, I missed this bit.
Hmm.

“root” and “password” are the correct details; rt_user is
only DB-side.
Your database and/or “root” user are messed up.

Try:

mysql -urt_user -p rt2
(enter your DB_RT_PASS here)
select * from Users where Name=‘root’;

and report back?

It returns an empty set.

Oops, I missed this bit.

Yeah, I was trying to head off responses that told me to go to the WebUI
since the email archive is full of them and I wondered how many of those
people ever got passed their problems. All is forgiven, though the next
person to do it will have no excuse. :slight_smile:

I keep trying to trace through the rt_admin tool with the Perl debugger,
but haven’t got a good enough handle on what’s going on yet to say anything
with certainty. I still have this suspicion somebody’s going to tell me
that it’s not okay to have everything installed as user rt. (Which is okay,
as long as I find out sooner rather than later. :slight_smile: )

Thanks for the help, any more insight you can provide would be great!

jdb

Blackstone, J. David wrote:

select * from Users where Name=‘root’;

It returns an empty set.

Right; there’s your problem. The root user didn’t get added to the db.

(Does “select * from Users;” show /any/ users added?)

I still have this suspicion somebody’s going to tell me
that it’s not okay to have everything installed as user rt. (Which is okay,
as long as I find out sooner rather than later. :slight_smile: )

I’ve not heard of anyone doing it, but I can’t think of any obvious
reason for it to fail.

So far you’ve got an rt2 database with at least some correct table
structure, but a missing user. And a WebUI that won’t let you in.
To me, this indicates that something went awry in populating the
initial database records, but everything is otherwise okay. Now
we have to figure out what died. :slight_smile:

“make dropdb” and retry the “make install”, perhaps? Keep a very
close eye on the output for any sign of insertion failure.
(Note, this will clobber your config.pm. Make a backup. :slight_smile:

-----Original Message-----
From: Phil Homewood [mailto:pdh@snapgear.com]
Sent: Wednesday, July 17, 2002 6:20 AM
To: rt-users@lists.fsck.com
Subject: Re: [rt-users] Installation: No RT user found. Please consult
yo ur RT administr ator.

Blackstone, J. David wrote:

select * from Users where Name=‘root’;

It returns an empty set.

Right; there’s your problem. The root user didn’t get added to the db.

(Does “select * from Users;” show /any/ users added?)

One of the things that would help me conceptually is to have this question
answered: There’s a difference between user accounts on my box, mysql
database users, and RT users, right? That’s three different kinds of users
total, right? (None of those groups are equal to each other, are they?)
What relationships exist between these groups, if any?

jdb

Okay, I started over from scratch, and had the same problem. Here’s a
complete log of my installation, including every assumption I made and every
little hack I had to make to avoid snags. (And I mean complete: starting
with installing Perl. You probably want to read the first paragraph and
skip to the end. But just in case the problem is in my MySQL setup or
something, everything is included.)

I’ve created a user rt, member of group rt. Right now all he has is
a ~/src directory with all the things I need. I’ll be extracting all
these tarballs in ~/build. I’m going to install each package into
it’s on directory in $HOME, and then symlink $HOME/pkg/bin/* into
$HOME/bin.

First, I build Perl:
CC=gcc ./configure.gnu --prefix=$HOME/perl561 && make && make test &&
make install
I’m ignoring anything about suidperl for now. It seems like this step
won’t be necessary since I intend to run everything as the rt user.
(If it becomes necessary, I’d look into pointing scripts at perl
itself, or make a symbolic link from perl to suidperl and see if I can
run without the setuid bit.)

Once Perl is installed, I go ahead and configure the CPAN module and
install, my favorite toys, just in case I need them later.
(Bundle::CPAN, Bundle::LWP, Bundle::DBI, Bundle::DBD::CSV,
Time::Piece).

Now it’s time to install mysql. I am following the directions under
Docs/mysql.info → Installing → Installing source → Quick install,
with some changes. (Not creating a mysql user or group.)
./configure --prefix=$HOME/mysql
make

Hold on: weirdness. I can’t remember if this happened or not.
“make[1]: *** No rule to make target my_init.c', needed by my_init.lo’. Stop.”
$ find . -name my_init.c
./mysys/my_init.c
$ cd mysys
$ make my_init.lo
$ cd …
$ make # again
(seemed to work…moving on)
make install
scripts/mysql_install_db
(chown/chgrp commands omitted)
cp support-files/my-medium.cnf ~/mysql/share/mysql/my.cnf
$HOME/mysql/safe_mysqld --user=rt &

Okay, on to Apache and mod_perl. This is Apache 1.3.26, mod_perl
1.27. They were current before the last time I blinked.
$ perl5.6.1 Makefile.PL APACHE_SRC=…/apache_1.3.26/src USE_APACI=1
DO_HTTPD=1 EVERYTHING=1 APACHE_PREFIX=$HOME/apache
$ make && make test && make install
$ cd …/apache_1.3.26
$ make install

Okay, now I’ve installed all the Stuff needed for rt, except for
some modules I’ll install in a minute. Presumably, nothing above
should affect my ability to get rt going. It’s all included here so
someone can tell me if it does, though. Note that I didn’t do
anything that wasn’t recorded here. (I haven’t configured mysql other
than what I typed when installing it. No accounts, passwords, or
anything. There was a sentence in the rt install docs that said,
“Don’t forget to setup permissions for your database,” along with some
helpful info for (of all things) Postgresql (I’d rather use Postgresql
but am trying to use Mysql to make sure everything goes swimmingly.)
Not quite sure what this entails, and I’ve taken no action. Sounds
like it just means allowing connections from anywhere besides
localhost, and I don’t need that now, anyway.)

So, proceeding on to rt itself. I’ve got rt 2.0.13.

I customize my Makefile in the following ways:
RT_PATH: /home/rt/rt2
RT_LOG_PATH: $(RT_PATH)/var
DB_TYPE: mysql (default)
DB_HOME: /home/rt/mysql
DB_DBA: root
DB_DBA_PASSWORD: (left blank; remember, I didn’t set up any accounts
or passwords)
DB_RT_USER: rt_user
DB_RT_PASS: I took note of this
WEB_USER: rt
WEB_GROUP: rt
PERL: /home/rt/bin/perl5.6.1
BIN_OWNER: rt
LIBS_OWNER: rt
LIBS_GROUP: rt

Now I run make testdeps. Obviously they’re not all there, so I run
make fixdeps. Make fixdeps is a beautiful thing, by the way.

It said Scalar::Util was not detected even after make fixdeps, so I
installed it with perl5.6.1 -MCPAN -e ‘install Scalar::Util’

I proceeded to downgrade HTML::Mason to version 1.02.

Now, everything seems to be ready, so I make install.

Enter the mysql password for root: (I’m leaving this blank)

Enter the mysql administrator’s database password to create a new user for
RT
Enter password: (blank again)
Enter the mysql administrator’s database password to nondestructively
reload the database
Enter password: (blank)
Enter the mysql password for rt_user: password from Makefile
Checking for existing system user…not found. This appears to be a
new installationCreating system user…done.
Can’t write to ‘/home/rt/rt2/var/rt.log.31510.1002’: No such file or
directory at /home/rt/perl561/lib/site_perl/5.6.1/Log/Dispatch/File.pm
line 72.
make: *** [insert] Error 2
Whoops, I’ll have to mkdir -p /home/rt/rt2/var myself. I do so, make
dropdb, and make install again.
Odd, when I make install again, I get:
cp: cannot create regular file `//home/rt/rt2/etc/acl.mysql’: Permission
denied
make: *** [acls] Error 1
The file already exists, so I delete it, make dropdb, and make install
again.
Same problem with /home/rt/rt2/etc/insertdata.

Okay, rt is successfully installed. Now I
$ rtadmin --user=root --password=xyzzy
No RT user found. Please consult your RT administrator.
$ rtadmin
No RT user found. Please consult your RT administrator.

What gives? I pass “select * from Users where Name=‘root’;” and get
something this time, at least.

mysql> select id, Name, Gecos from Users;
| id | Name | Gecos |
| 1 | RT_System | NULL |
| 2 | Nobody | NULL |
| 3 | root | root |
3 rows in set (0.01 sec)

Since the function in rtadmin that’s dying for me is something about
“look up user by Gecos,” why do I have the feeling those NULL’s mean
something for me? And should there be an “rt_user” in there somewhere?

Last time I did not have a root user, this time I do. Last time I
had some weirdness in the database install and wound up adding my
rt_user by hand directly in mysql. This time I didn’t have that
weirdness and didn’t take that action, so at least I seem to be
closer.

Doing some tracing, I wind up at
DBIx::SearchBuilder::Record::Cachable::_lookup_primary_cache_key, which is
called to look up a $alternate_key of "Users:Gecos=rt’ within a hash from
$this->_KeyCache that contains only ‘Users:Name=Nobody’ and
‘Users:Name=RT_System’. It looks like it’s trying to look up on the wrong
field.

I don’t understand why this works for everyone else and not me. It looks
like there’s no way it can work at all.

It’s looking up by $Gecos, which it got from my RT user’s UNIX login ID,
“rt.” So, is it supposed to be looking for an RT user with the same name as
the UNIX login ID? Is there such a user (I thought it was supposed to be
named rt_user, but there doesn’t seem to be a user with that name, either.)
How do I tell it that the UNIX login ID has nothing to do with RT user
names?

It looks like it wants me to run this as root. Am I the only person who
tried to install this as a non-root user? Is that the problem?

I’m grasping at straws here with no real insight into what’s going on.

jdb

-----Original Message-----
From: Blackstone, J. David [mailto:jdavid.blackstone@cingular.com]
Sent: Wednesday, July 17, 2002 8:40 AM
To: rt-users@lists.fsck.com
Subject: RE: [rt-users] Installation: No RT user found. Please consult
yo ur RT administr ator.

Okay, I started over from scratch, and had the same
problem. Here’s a
complete log of my installation, including every assumption I
made and every
little hack I had to make to avoid snags. (And I mean
complete: starting
with installing Perl. You probably want to read the first
paragraph and
skip to the end. But just in case the problem is in my MySQL setup or
something, everything is included.)


I’ve created a user rt, member of group rt. Right now all he has is
a ~/src directory with all the things I need. I’ll be extracting all
these tarballs in ~/build. I’m going to install each package into
it’s on directory in $HOME, and then symlink $HOME/pkg/bin/* into
$HOME/bin.

First, I build Perl:
CC=gcc ./configure.gnu --prefix=$HOME/perl561 && make && make test &&
make install
I’m ignoring anything about suidperl for now. It seems like this step
won’t be necessary since I intend to run everything as the rt user.
(If it becomes necessary, I’d look into pointing scripts at perl
itself, or make a symbolic link from perl to suidperl and see if I can
run without the setuid bit.)

Once Perl is installed, I go ahead and configure the CPAN module and
install, my favorite toys, just in case I need them later.
(Bundle::CPAN, Bundle::LWP, Bundle::DBI, Bundle::DBD::CSV,
Time::Piece).

Now it’s time to install mysql. I am following the directions under
Docs/mysql.info → Installing → Installing source → Quick install,
with some changes. (Not creating a mysql user or group.)
./configure --prefix=$HOME/mysql
make

Hold on: weirdness. I can’t remember if this happened or not.
“make[1]: *** No rule to make target my_init.c', needed by my_init.lo’. Stop.”
$ find . -name my_init.c
./mysys/my_init.c
$ cd mysys
$ make my_init.lo
$ cd …
$ make # again
(seemed to work…moving on)
make install
scripts/mysql_install_db
(chown/chgrp commands omitted)
cp support-files/my-medium.cnf ~/mysql/share/mysql/my.cnf
$HOME/mysql/safe_mysqld --user=rt &

Okay, on to Apache and mod_perl. This is Apache 1.3.26, mod_perl
1.27. They were current before the last time I blinked.
$ perl5.6.1 Makefile.PL APACHE_SRC=…/apache_1.3.26/src USE_APACI=1
DO_HTTPD=1 EVERYTHING=1 APACHE_PREFIX=$HOME/apache
$ make && make test && make install
$ cd …/apache_1.3.26
$ make install

Okay, now I’ve installed all the Stuff needed for rt, except for
some modules I’ll install in a minute. Presumably, nothing above
should affect my ability to get rt going. It’s all included here so
someone can tell me if it does, though. Note that I didn’t do
anything that wasn’t recorded here. (I haven’t configured mysql other
than what I typed when installing it. No accounts, passwords, or
anything. There was a sentence in the rt install docs that said,
“Don’t forget to setup permissions for your database,” along with some
helpful info for (of all things) Postgresql (I’d rather use Postgresql
but am trying to use Mysql to make sure everything goes swimmingly.)
Not quite sure what this entails, and I’ve taken no action. Sounds
like it just means allowing connections from anywhere besides
localhost, and I don’t need that now, anyway.)

So, proceeding on to rt itself. I’ve got rt 2.0.13.

I customize my Makefile in the following ways:
RT_PATH: /home/rt/rt2
RT_LOG_PATH: $(RT_PATH)/var
DB_TYPE: mysql (default)
DB_HOME: /home/rt/mysql
DB_DBA: root
DB_DBA_PASSWORD: (left blank; remember, I didn’t set up any accounts
or passwords)
DB_RT_USER: rt_user
DB_RT_PASS: I took note of this
WEB_USER: rt
WEB_GROUP: rt
PERL: /home/rt/bin/perl5.6.1
BIN_OWNER: rt
LIBS_OWNER: rt
LIBS_GROUP: rt

Now I run make testdeps. Obviously they’re not all there, so I run
make fixdeps. Make fixdeps is a beautiful thing, by the way.

It said Scalar::Util was not detected even after make fixdeps, so I
installed it with perl5.6.1 -MCPAN -e ‘install Scalar::Util’

I proceeded to downgrade HTML::Mason to version 1.02.

Now, everything seems to be ready, so I make install.

Enter the mysql password for root: (I’m leaving this blank)

Enter the mysql administrator’s database password to create a
new user for
RT
Enter password: (blank again)
Enter the mysql administrator’s database password to nondestructively
reload the database
Enter password: (blank)
Enter the mysql password for rt_user: password from Makefile
Checking for existing system user…not found. This appears to be a
new installationCreating system user…done.
Can’t write to ‘/home/rt/rt2/var/rt.log.31510.1002’: No such file or
directory at /home/rt/perl561/lib/site_perl/5.6.1/Log/Dispatch/File.pm
line 72.
make: *** [insert] Error 2
Whoops, I’ll have to mkdir -p /home/rt/rt2/var myself. I do so, make
dropdb, and make install again.
Odd, when I make install again, I get:
cp: cannot create regular file `//home/rt/rt2/etc/acl.mysql’:
Permission
denied
make: *** [acls] Error 1
The file already exists, so I delete it, make dropdb, and make install
again.
Same problem with /home/rt/rt2/etc/insertdata.

Okay, rt is successfully installed. Now I
$ rtadmin --user=root --password=xyzzy
No RT user found. Please consult your RT administrator.
$ rtadmin
No RT user found. Please consult your RT administrator.

What gives? I pass “select * from Users where Name=‘root’;” and get
something this time, at least.

mysql> select id, Name, Gecos from Users;
±—±----------±------+
| id | Name | Gecos |
±—±----------±------+
| 1 | RT_System | NULL |
| 2 | Nobody | NULL |
| 3 | root | root |
±—±----------±------+
3 rows in set (0.01 sec)

Since the function in rtadmin that’s dying for me is something about
“look up user by Gecos,” why do I have the feeling those NULL’s mean
something for me? And should there be an “rt_user” in there
somewhere?

Last time I did not have a root user, this time I do. Last time I
had some weirdness in the database install and wound up adding my
rt_user by hand directly in mysql. This time I didn’t have that
weirdness and didn’t take that action, so at least I seem to be
closer.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at
http://fsck.com/rtfm