I’m trying to install the RT::Authen::Token plugin on an RT 4.4 instance. It’s using a PostgreSQL database that’s installed on another host and other databases for other apps are present in there.
The “initdb” target of the Makefile seems to require access to the database as the “postgres” user, which is 1) not allowed remotely and 2) questionable since access to RT’s own database should be enough.
I’d rather not grant access to the postgres user to this one app on this one host if at all possible.
Is there a way to indicate to the Makefile that it can do its thing with another user than “postgres” ?
If you can access the postgres shell manually you can actually just run the Pg commands in the terminal, they are found in etc/schema.Pg
:
CREATE SEQUENCE rtxauthtokens_id_seq;
CREATE TABLE RTxAuthTokens (
id integer DEFAULT nextval('rtxauthtokens_id_seq'),
Owner integer NOT NULL DEFAULT 0,
Token varchar(256) NULL,
Description varchar(255) NOT NULL DEFAULT '',
LastUsed timestamp DEFAULT NULL,
Creator integer NOT NULL DEFAULT 0,
Created timestamp DEFAULT NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated timestamp DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE INDEX RTxAuthTokensOwner ON RTxAuthTokens (Owner);
The reason that RT is asking for the Postgres user is because you set the database admin to the “Postgres” user ( Which is the default )if your RT user has all the necessary rights then try updating that config to use the RT db user!
–with-db-dba=DBA name of database administrator (default: root or
postgres)
oh ok nice thanks for these details! I’ll try that out soon, maybe also figure out how to set a different database admin user
nice, setting $DatabaseAdmin in the RT_SiteConfig.pm file and supplying the user’s password at runtime for the Makefile initdb target did the trick!
cheers!