How to run new rt cli in cron

The rt cli from 2001 does not require a password to get the content of a
ticket. So running it as part of a cron is not a problem

To get the content of a ticket with rt cli from rt-3.8.2 I need to run rt
show , but it requires a password.
So I need to run it interactively. Plus I am not comfortable to feed a
password in cronjob.

How do I by pass the password prompt? Is there another user I can use
instead where I don’t have to feed a password thru cronjob?

Thanks

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Please do not CC both rt-users and rt-devel for a single post. Pick one
list or the other.

What’s the specific problem with putting a password in a crontab or a shell
script that cron calls? Only folks with root access could see the
password. Besides, you’ve got to put the RT database password in plain
text in your RT_SiteConfig file, unless you are running without a password,
which is even worse…

I haven’t used the CLI, but if it’s truly interactive, you’ll need to write
an expect script.

BTW, it appears you didn’t catch my email with specific instructions for
creating a Logo file…

James MoseleyAsif Iqbal vadud3@gmail.com wrote:

The rt cli from 2001 does not require a password to get the content of a
ticket. So running it as part of a cron is not a problem

To get the content of a ticket with rt cli from rt-3.8.2 I need to run rt
show , but it requires a password.
So I need to run it interactively. Plus I am not comfortable to feed a
password in cronjob.

How do I by pass the password prompt? Is there another user I can use
instead where I don’t have to feed a password thru cronjob?

What’s the specific problem with putting a password in a crontab or a shell
script that cron calls? Only folks with root access could see the
password. Besides, you’ve got to put the RT database password in plain
text in your RT_SiteConfig file, unless you are running without a password,
which is even worse…

good point. that answered my question

I haven’t used the CLI, but if it’s truly interactive, you’ll need to write
an expect script.

BTW, it appears you didn’t catch my email with specific instructions for
creating a Logo file…

I tried to follow. Is it possible to point to what I have done wrong based
on my last repy to
that email.

Thanks for your help

James Moseley

The rt cli from 2001 does not require a password to get the content of a
ticket. So running it as part of a cron is not a problem

To get the content of a ticket with rt cli from rt-3.8.2 I need to run rt
show , but it requires a password.
So I need to run it interactively. Plus I am not comfortable to feed a
password in cronjob.

How do I by pass the password prompt? Is there another user I can use
instead where I don’t have to feed a password thru cronjob?

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

How do I by pass the password prompt? Is there another user I can use
instead where I don’t have to feed a password thru cronjob?

You do not need an expect script or to feed the password to the CLI’s
STDIN at all. All you need is to arrange for the environment variables
RTUSER, RTSERVER and RTPASSWD to be set in your environment before
calling the CLI, like so:

#!/bin/sh

export RTUSER=someone
export RTPASSWD=Something
export RTSERVER=https://rt.server.com/

/opt/rt3/bin/rt show ticket/123

If you are parsing the output of the CLI, you’re better off using the
REST interface instead. The CLI’s output changes from version to
version, which will throw off your parse. The REST output won’t change.

See REST - Request Tracker Wiki

Tom Lahti