https://rt-wiki.bestpractical.com/index.php?title=AutogeneratedPassword&feed=atom&action=history
AutogeneratedPassword - Revision history
2024-03-29T16:00:46Z
Revision history for this page on the wiki
MediaWiki 1.37.2
https://rt-wiki.bestpractical.com/index.php?title=AutogeneratedPassword&diff=26278&oldid=prev
Ubergeek42: Fix formatting
2016-07-14T15:36:50Z
<p>Fix formatting</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:36, 14 July 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l9">Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Note: fixed variable case error below as described at http://gossamer-threads.com/lists/rt/users/26492?search_string=password;#26492</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Note: fixed variable case error below as described at http://gossamer-threads.com/lists/rt/users/26492?search_string=password;#26492</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><pre></ins><nowiki>Subject: AutoReply: {$Ticket-&gt;Subject}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del><nowiki>Subject: AutoReply: {$Ticket-&gt;Subject}</div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l78">Line 78:</td>
<td colspan="2" class="diff-lineno">Line 76:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -------------------------------------------------------------------------</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -------------------------------------------------------------------------</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {$Transaction-&gt;Content()}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {$Transaction-&gt;Content()}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </nowiki></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </nowiki><ins style="font-weight: bold; text-decoration: none;"></pre></ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<!-- diff cache key bestpractical_mediawiki1459887241:diff::1.12:old-298:rev-26278 -->
</table>
Ubergeek42
https://rt-wiki.bestpractical.com/index.php?title=AutogeneratedPassword&diff=298&oldid=prev
Admin: 2 revisions imported
2016-04-06T20:03:18Z
<p>2 revisions imported</p>
<p><b>New page</b></p><div>Solution for User Password + Viewing ticket status<br />
<br />
The following template will send users an auto-generated random pronounceable password if inserted into an autoreply template. Users who have previously submitted tickets but not yet had a password assigned will have a password assigned and sent on submission of their first new ticket. (All previous tickets will still show up in the web ui) --[[JesseVincent]]<br />
<br />
Add this line to the if statement if you do not want to auto generate a password for people that logon using ldap credentials from your domain. I had to do this because I am using RT::Authen::[[ExternalAuth]].<br />
<br />
($Ticket-&gt;[[RequestorAddresses]] !~ m/domain\.com$/i) &amp;&amp;<br />
<br />
Note: fixed variable case error below as described at http://gossamer-threads.com/lists/rt/users/26492?search_string=password;#26492<br />
<br />
'<br />
<br />
<nowiki>Subject: AutoReply: {$Ticket-&gt;Subject}<br />
<br />
<br />
Greetings,<br />
<br />
This message has been automatically generated in response to the<br />
creation of a helpdesk call:<br />
<br />
"{$Ticket-&gt;Subject()}",<br />
<br />
a summary of which appears below.<br />
<br />
There is no need to reply to this message right now. Your ticket has been<br />
assigned an ID of [{$rtname} #{$Ticket-&gt;id()}]. Please include this string<br />
in the subject line of all future correspondence about this issue.<br />
<br />
{<br />
*RT::User::GenerateRandomNextChar = \&amp;RT::User::_GenerateRandomNextChar;<br />
<br />
<br />
if (($Transaction-&gt;CreatorObj-&gt;id != $RT::Nobody-&gt;id) &amp;&amp;<br />
(!$Transaction-&gt;CreatorObj-&gt;Privileged) &amp;&amp;<br />
($Transaction-&gt;CreatorObj-&gt;__Value('Password') eq '*NO-PASSWORD*')<br />
) {<br />
<br />
<br />
<br />
my $user = RT::User-&gt;new($RT::SystemUser);<br />
$user-&gt;Load($Transaction-&gt;CreatorObj-&gt;Id);<br />
my ($stat, $pass) = $user-&gt;SetRandomPassword();<br />
<br />
<br />
<br />
if (!$stat) {<br />
$OUT .=<br />
<br />
"An internal error has occurred. RT was not able to set a password for you.<br />
Please contact your local RT administrator for assistance.";<br />
<br />
<br />
}<br />
<br />
<br />
$OUT .= "<br />
You can check the current status and history of your requests at:<br />
<br />
<br />
".$RT::WebURL."<br />
<br />
<br />
When prompted, enter the following username and password:<br />
<br />
<br />
Username: ".$user-&gt;Name."<br />
Password: ".$pass."<br />
<br />
";<br />
}<br />
}<br />
<br />
<br />
Thank you.<br />
{$Ticket-&gt;QueueObj-&gt;CorrespondAddress()}<br />
<br />
<br />
-------------------------------------------------------------------------<br />
{$Transaction-&gt;Content()}<br />
</nowiki><br />
<br />
'</div>
Admin
https://rt-wiki.bestpractical.com/index.php?title=AutogeneratedPassword&diff=296&oldid=prev
BillCole at 13:22, 11 November 2010
2010-11-11T13:22:37Z
<p></p>
<p><b>New page</b></p><div>Solution for User Password + Viewing ticket status<br />
<br />
The following template will send users an auto-generated random pronounceable password if inserted into an autoreply template. Users who have previously submitted tickets but not yet had a password assigned will have a password assigned and sent on submission of their first new ticket. (All previous tickets will still show up in the web ui) --[[JesseVincent]]<br />
<br />
Add this line to the if statement if you do not want to auto generate a password for people that logon using ldap credentials from your domain. I had to do this because I am using RT::Authen::[[ExternalAuth]].<br />
<br />
($Ticket-&gt;[[RequestorAddresses]] !~ m/domain\.com$/i) &amp;&amp;<br />
<br />
Note: fixed variable case error below as described at http://gossamer-threads.com/lists/rt/users/26492?search_string=password;#26492<br />
<br />
'<br />
<br />
<nowiki>Subject: AutoReply: {$Ticket-&gt;Subject}<br />
<br />
<br />
Greetings,<br />
<br />
This message has been automatically generated in response to the<br />
creation of a helpdesk call:<br />
<br />
"{$Ticket-&gt;Subject()}",<br />
<br />
a summary of which appears below.<br />
<br />
There is no need to reply to this message right now. Your ticket has been<br />
assigned an ID of [{$rtname} #{$Ticket-&gt;id()}]. Please include this string<br />
in the subject line of all future correspondence about this issue.<br />
<br />
{<br />
*RT::User::GenerateRandomNextChar = \&amp;RT::User::_GenerateRandomNextChar;<br />
<br />
<br />
if (($Transaction-&gt;CreatorObj-&gt;id != $RT::Nobody-&gt;id) &amp;&amp;<br />
(!$Transaction-&gt;CreatorObj-&gt;Privileged) &amp;&amp;<br />
($Transaction-&gt;CreatorObj-&gt;__Value('Password') eq '*NO-PASSWORD*')<br />
) {<br />
<br />
<br />
<br />
my $user = RT::User-&gt;new($RT::SystemUser);<br />
$user-&gt;Load($Transaction-&gt;CreatorObj-&gt;Id);<br />
my ($stat, $pass) = $user-&gt;SetRandomPassword();<br />
<br />
<br />
<br />
if (!$stat) {<br />
$OUT .=<br />
<br />
"An internal error has occurred. RT was not able to set a password for you.<br />
Please contact your local RT administrator for assistance.";<br />
<br />
<br />
}<br />
<br />
<br />
$OUT .= "<br />
You can check the current status and history of your requests at:<br />
<br />
<br />
".$RT::WebURL."<br />
<br />
<br />
When prompted, enter the following username and password:<br />
<br />
<br />
Username: ".$user-&gt;Name."<br />
Password: ".$pass."<br />
<br />
";<br />
}<br />
}<br />
<br />
<br />
Thank you.<br />
{$Ticket-&gt;QueueObj-&gt;CorrespondAddress()}<br />
<br />
<br />
-------------------------------------------------------------------------<br />
{$Transaction-&gt;Content()}<br />
</nowiki><br />
<br />
'</div>
BillCole