[rt-users] Using qx in scrip to run a shell script?

2010-10-01 Thread Peter Roosakos
I was curious if it is possible to use the perl 'qx' or similar command
inside of a custom action scrip to run a system level shell script.  My goal
is to automate the process of restarting a system service or daemon.  I
tried putting a couple of qx commands in the scrip. No errors, but no
restart either.

 

Peter

 


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Using qx in scrip to run a shell script?

2010-10-01 Thread Peter Roosakos
Yeah, probably a bad idea to be using RT scrips to do this from a security
standpoint, but when it didn't work it peaked my curiosity.  I'll play with
rights to see if this is indeed the only reason it didn't work...

Thanks for the reply!

Peter


-Original Message-
From: Jerrad Pierce [mailto:jpie...@cambridgeenergyalliance.org] 
Sent: Friday, October 01, 2010 12:08 PM
To: Peter Roosakos
Cc: rt-users
Subject: Re: [rt-users] Using qx in scrip to run a shell script?

On Fri, Oct 1, 2010 at 14:58, Peter Roosakos proosa...@yahoo.com wrote:
 I was curious if it is possible to use the perl ‘qx’ or similar command
 inside of a custom action scrip to run a system level shell script.  My
goal
 is to automate the process of restarting a system service or daemon.  I
 tried putting a couple of qx commands in the scrip. No errors, but no
 restart either.
Unless it's poorly configured, your webserver should not be root and
therefore
iughtn't not have the rights to do this.

Although more complex, if I were keen on such functionality, I'd have the
script send a magic cookie to an alias connected to a script that does your
dirty deed. Security of said script is left as a a blanket for the user to
throw
right out the door, but rejecting messages not originating on localhost
would
be a start.

Otherwise have you considered *shudder* SNMP?
-- 
Cambridge Energy Alliance: Save money. Save the planet.


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


[rt-users] ExternalAuth over Public Network?

2010-08-17 Thread Peter Roosakos
I was curious if ExternalAuth assumes a secure network (private, VPN, etc.),
or if it can securely authenticate to an LDAP/AD server over a public
network (ssl, etc.).  I didn't find any general security/configuration
discussions on the list.

 

Any comments? 

 

Peter

 


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] WikiText as RTFM Content

2010-07-29 Thread Peter Roosakos
Is anyone using WikiText fields to create formatted content for their RTFM
Articles?  If so, I've noticed that including an article in an email reply
includes the wikitext field content unformatted, which is a bit user
unfriendly.  I was curious if anyone has found a workaround for this?  I'm
thinking maybe either an extension that converts from Wiki to RTF/HTML, or
an extension that modifies the 'include RTFM Article' function to simply
include a link to the wiki article instead of the article itself (from
within  /Ticket/Update.html).  

 

Peter

 


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

[rt-users] RTFM Saved Searches on Dashboards

2010-06-30 Thread Peter Roosakos
I'm curious if anyone is using RTFM saved searches as queries on dashboards.
They show up in the 'Available' selection box as 'Article:
SavedSearchName', but when added to the dashboard shows an error could
not find component for path '/Search/Elements/Article'.

 

 

Peter


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Read User Custom Field of Ticket Originator

2010-06-18 Thread Peter Roosakos
It sounds like you want something like
$self-TicketObj-CreatorObj-FirstCustomFieldValue('...')

-kevin


That did the trick, thanks!



Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Read User Custom Field of Ticket Originator

2010-06-17 Thread Peter Roosakos
I was curious if anyone could point me to sample code snippet that would
allow me to retrieve the value of a user custom field associated with the
original requestor/originator of a ticket generated from an incoming email,
from within a Scrip.  The ultimate goal is, on create of a new ticket in the
queue associated with email generated tickets, inspect a custom field for
the requestor of that ticket, and move the ticket to another queue based on
the value of the requestor's custom field. I have found lots of examples to
read values of custom fields associated directly with the ticket, but not
user custom fields associated with the original requestor.  

 

Thanks,

 

Peter


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] RTFM 2.4.2 and SQLite?

2010-03-03 Thread Peter Roosakos
The specific error message upon attempting make initdb after successful make
install is:

 

Couldn't finish 'schema' step.

 

ERROR: Couldn't find schema file(s) '*'

 

...returned with error: 65280

make: *** [initdb] Error 255

 

The specific error messages generated when trying to create a class AFTER
installing RTFM by using acl.Pg and schema.Pg to install on SQLite are:

 

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [warning]: Use of uninitialized value $_[1] in
join or string at (eval 2749) line 2, GEN73 line 47. ((eval 2749):2)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [warning]: Use of uninitialized value in numeric
ne (!=) at
/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes/
Modify.html line 137, GEN73 line 47.
(/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes
/Modify.html:137)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [warning]: Use of uninitialized value in join or
string at
/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes/
Modify.html line 57, GEN73 line 47.
(/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes
/Modify.html:57)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [warning]: Use of uninitialized value in join or
string at
/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes/
Modify.html line 63, GEN73 line 47.
(/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes
/Modify.html:63)

[Wed Mar  3 20:06:09 2010] [crit]: HasRight called with no valid object
(/home/vadmin/Downloads/rt-3.8.7/bin/../lib/RT/Principal_Overlay.pm:322)

[Wed Mar  3 20:06:09 2010] [warning]: Use of uninitialized value in join or
string at
/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes/
Modify.html line 67, GEN73 line 47.
(/home/vadmin/Downloads/rt-3.8.7/local/plugins/RT-FM/html/Admin/RTFM/Classes
/Modify.html:67)

 

Peter

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] RTFM 2.4.2 and SQLite?

2010-03-02 Thread Peter Roosakos
I'm currently running a development environment with RT 3.8.7 in development
mode and SQlite.  I downloaded RTFM 2.4.2 and attempted to install.  Make
initdb failed, as it could not find the appropriate schema file.  I took a
peek in etc and it appears that there are schema files for mysql, postgres,
oracle, but none for SQLite.  I tried using the postgres schema and acl
files by copying to schema.SQLite and acl.SQLite.  Make initdb succeeded
with no errors.  

 

Creating a class in the UI finished with 'object created', but generates a
bunch of log errors, and although a record ends up in the FM_Classes table,
it must not be complete, as the class does not show up in the UI.  

 

In short, it looks like using the postgres acl and schema files didn't work.
Has anyone else gotten this combination to work?

 

Peter

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com