Installation: No RT user found. Please consult yo ur RT administrator

During installation:
$ whoami
rt
$ /path/to/rtadmin --user=root --password="“
No RT user found. Please consult your RT administrator.
$ /path/to/rtadmin --user=rt --password=”"
No RT user found. Please consult your RT administrator.
$ /path/to/rtadmin
No RT user found. Please consult your RT administrator.
$ su
Password:

/path/to/rtadmin --user=root --password=""

User root Password: The new value has been set.

^D

I’m told to type this command during installation to avoid an important
security hole with the default root RT user password. I have compiled and
installed everything (from Perl to rt itself) as a UNIX user called “rt”.
Apparently there is some confusion between the root RT user and the root
UNIX user; I cannot run the rtadmin command except as root.

jdb

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

Doing some tracing, I wind up at
DBIx::SearchBuilder::Record::Cachable::_lookup_primary_cache_k
ey, 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 bymy_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


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

Okay, as a workaround I seem to be able to
$ whoami
rt
$ mysql -urt_user -p rt2
mysql> update Users set Gecos = ‘rt’ where Name = ‘root’;
mysql> quit
$ rtadmin
… works

But it’s only dumb luck and a lot of scraping (inspired by things
people’ve said on this list and things I’ve seen trying to step through the
code) that enabled me to figure that out. Definitely not something I could
have figured out from the install docs alone, and I’m still not entirely
sure this was what I should have done.

Basically, when rt installs, it shouldn’t assume that the Gecos of the RT
root user is going to be “root,” that is, it shouldn’t assume I’m going to
install this as root and run the admin tools as root. Is there a place to
configure this in the Makefile or something before I hit make install?

Am I the only person who doesn’t want to run rt as root?

jdb

Basically, when rt installs, it shouldn’t assume that the Gecos of the RT
root user is going to be “root,” that is, it shouldn’t assume I’m going to
install this as root and run the admin tools as root. Is there a place to
configure this in the Makefile or something before I hit make install?

I’m by no means a mysql expert, but it sounds like your mysql is using
the information it the gecos field for authentication. I expect that
could, and should change.

seph

Blackstone, J. David wrote:

Okay, as a workaround I seem to be able to
$ whoami
rt
$ mysql -urt_user -p rt2
mysql> update Users set Gecos = ‘rt’ where Name = ‘root’;
mysql> quit
$ rtadmin
… works

Cool. Suggested patch attached, for next time. :slight_smile:

(Note, I haven’t tried this. If you’re in a position to do so, would
you mind applying it and reattempting your installation?

Basically, when rt installs, it shouldn’t assume that the Gecos of the RT
root user is going to be “root,” that is, it shouldn’t assume I’m going to
install this as root and run the admin tools as root. Is there a place to
configure this in the Makefile or something before I hit make install?

With this patch, hopefully. :wink:

Am I the only person who doesn’t want to run rt as root?

It doesn’t “run” as root per se; it’ll run as

a) the userid of your MTA (for mailed transactions)
b) the userid of your webserver (for the web UI)
c) Joe Random User’s userid (for commandline UI)

Anyway, see how the patch goes. The description of ROOT_USER
could use some improvement…

rt-nonroot.patch (1.37 KB)