<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-203776310350862215</id><updated>2024-09-09T20:52:06.133-07:00</updated><title type='text'>Elias Chatzigeorgiou</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elias-chatzigeorgiou.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Elias Chatzigeorgiou</name><uri>http://www.blogger.com/profile/10701710618830629222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-203776310350862215.post-810571889790436515</id><published>2012-08-18T08:47:00.003-07:00</published><updated>2012-08-18T08:48:03.374-07:00</updated><title type='text'>Fixing PRIMARY KEY constraint issues in SQL Server 2005 Replication</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 class=&quot;date-header&quot; style=&quot;background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-top-color: rgb(34, 34, 34); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 0px; bottom: auto; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; margin: 0px -15px 1px; min-height: 0px; padding: 0px; position: static; right: 15px; text-shadow: rgb(0, 0, 0) 0px 0px -1px;&quot;&gt;
&lt;span style=&quot;border-left-color: rgb(34, 34, 34); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: solid; border-right-width: 0px; display: block; padding: 0.5em 15px;&quot;&gt;Wednesday, January 7, 2009&lt;/span&gt;&lt;span style=&quot;border-left-color: rgb(34, 34, 34); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: solid; border-right-width: 0px; display: block; padding: 0.5em 15px;&quot;&gt;(copied from:&amp;nbsp;&lt;a href=&quot;http://bassplayerdoc.blogspot.gr/2009/01/fixing-primary-key-constraint-issues-in.html&quot;&gt;http://bassplayerdoc.blogspot.gr/2009/01/fixing-primary-key-constraint-issues-in.html&lt;/a&gt;)&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;date-posts&quot; style=&quot;border-top-color: rgb(34, 34, 34); border-top-style: solid; border-top-width: 1px; clear: both; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin: 0px -15px; padding: 8px 15px 0px;&quot;&gt;
&lt;div class=&quot;post-outer&quot; style=&quot;border-bottom-style: none; border-top-style: none; margin: 0px -15px; padding: 0px 15px 10px;&quot;&gt;
&lt;div class=&quot;post hentry&quot; itemscope=&quot;itemscope&quot; itemtype=&quot;http://schema.org/BlogPosting&quot; style=&quot;min-height: 0px; position: relative;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=203776310350862215&quot; name=&quot;3490343680557734416&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;font-size: 22px; line-height: normal; margin: 0px; position: relative;&quot;&gt;
Fixing PRIMARY KEY constraint issues in SQL Server 2005 Replication&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;line-height: 1.6; margin: 0px 0px 1em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-3490343680557734416&quot; itemprop=&quot;articleBody&quot; style=&quot;line-height: 1.4; position: relative; width: 586px;&quot;&gt;
&lt;span style=&quot;font-family: arial;&quot;&gt;I must admit that I had to stay away from replication for quite a while since most of the work I&#39;ve done in my previous job has a lot to do with disaster recovery. Nonetheless, I&#39;m presented with new challenges every single day which I need to face. I got notified for an error regarding a transactional replication issue between two SQL Server 2005 instances. The error went something like this&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;trebuchet ms&#39;; font-size: 11px;&quot;&gt;&lt;em&gt;&lt;strong&gt;Replication-Replication Distribution Subsystem: agent INSTANCE-db-Publication-SUBSCRIBER_INSTANCE-21 failed. Violation of PRIMARY KEY constraint &#39;PK_Whatever&#39;. Cannot insert duplicate key in object &#39;dbo.table1&#39;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: arial;&quot;&gt;The error message simply says that replication between the publisher and the subscriber could not push thru due to an existing record in the subscription that is causing a violation of the PRIMARY KEY constraint. Either a record is manually inserted in the subscriber or its just an annoying application which is not properly configured. Here&#39;s how you can fix this&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Open Replication Monitor and check for the publication that is causing the error. You should see some error messages in the details that display something about the transaction sequence number, publisher id and command id values&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Next, you retrieve the command associated with the transaction sequence number using the system stored procedure&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms176109(SQL.90).aspx&quot; style=&quot;text-decoration: none;&quot;&gt;sp_browsereplcmds&lt;/a&gt;. This will return a result set of the replicated commands stored in the Distribution database at the Distributor. The query should look something like this&lt;/span&gt;&lt;/li&gt;
&lt;br /&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;; font-size: 11px;&quot;&gt;&lt;em&gt;&lt;strong&gt;EXEC Distribution..sp_browsereplcmds @xact_seqno_start = &#39;0x000B5103000043B7000700000000&#39; ,@xact_seqno_end = &#39;0x000B5103000043B7000700000000&#39;,@command_id =2 , @publisher_database_id = 1&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;This will give you an idea on the possible INSERT/UPDATE/DELETE statement that is inside this transaction. Based on the error message, we are looking at either an INSERT or an UPDATE statement.&lt;/span&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Next, run a SELECT query on the subscriber instance against the table specified in the subscription passing the values you retrieved from the&amp;nbsp;&lt;strong&gt;&lt;span style=&quot;font-size: 11px;&quot;&gt;sp_browsereplcmds&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;system stored procedure.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;If the record already exists, simply delete the record since it will be written over by the replication (of course, this is not always the case and would depend on your business requirements)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;This is just an overview of what you can do when you see such errors in replication. There are a few more articles and tips to help you get by from this&amp;nbsp;&lt;a href=&quot;http://www.replicationanswers.com/default.asp&quot; style=&quot;text-decoration: none;&quot;&gt;website&lt;/a&gt;&amp;nbsp;by Paul Ibison&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;line-height: 1.6; margin: 1.5em 0px 0px;&quot;&gt;
&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;
&lt;span class=&quot;post-author vcard&quot; style=&quot;margin-left: 0px; margin-right: 1em;&quot;&gt;Posted by&amp;nbsp;&lt;span class=&quot;fn&quot;&gt;&lt;a href=&quot;http://www.blogger.com/profile/07565782661284058863&quot; itemprop=&quot;author&quot; rel=&quot;author&quot; style=&quot;text-decoration: none;&quot; title=&quot;author profile&quot;&gt;Edwin Sarmiento&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;post-timestamp&quot; style=&quot;margin-left: -1em; margin-right: 1em;&quot;&gt;at&amp;nbsp;&lt;a class=&quot;timestamp-link&quot; href=&quot;http://bassplayerdoc.blogspot.gr/2009/01/fixing-primary-key-constraint-issues-in.html&quot; itemprop=&quot;url&quot; rel=&quot;bookmark&quot; style=&quot;text-decoration: none;&quot; title=&quot;permanent link&quot;&gt;&lt;abbr class=&quot;published&quot; itemprop=&quot;datePublished&quot; style=&quot;border: none;&quot; title=&quot;2009-01-07T07:07:00+08:00&quot;&gt;7:07 AM&lt;/abbr&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;post-comment-link&quot; style=&quot;margin-right: 1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;post-icons&quot; style=&quot;margin-right: 1em;&quot;&gt;&lt;span class=&quot;item-action&quot;&gt;&lt;a href=&quot;http://www.blogger.com/email-post.g?blogID=92377218009570869&amp;amp;postID=3490343680557734416&quot; style=&quot;text-decoration: none;&quot; title=&quot;Email Post&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;icon-action&quot; height=&quot;13&quot; src=&quot;http://img1.blogblog.com/img/icon18_email.gif&quot; style=&quot;border: none !important; margin: 0px 0px 0px 0.5em !important; position: relative; vertical-align: middle;&quot; width=&quot;18&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-share-buttons goog-inline-block&quot; style=&quot;display: inline-block; margin-right: 0px; margin-top: 0.5em; position: relative; vertical-align: middle;&quot;&gt;
&lt;a class=&quot;goog-inline-block share-button sb-email&quot; href=&quot;http://www.blogger.com/share-post.g?blogID=92377218009570869&amp;amp;postID=3490343680557734416&amp;amp;target=email&quot; style=&quot;background-image: url(http://www.blogger.com/img/share_buttons_20_2.png) !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; display: inline-block; height: 20px; margin-left: -1px; overflow: hidden; position: relative; text-decoration: none; width: 20px;&quot; target=&quot;_blank&quot; title=&quot;Email This&quot;&gt;&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Email This&lt;/span&gt;&lt;/a&gt;&lt;a class=&quot;goog-inline-block share-button sb-blog&quot; href=&quot;http://www.blogger.com/share-post.g?blogID=92377218009570869&amp;amp;postID=3490343680557734416&amp;amp;target=blog&quot; style=&quot;background-image: url(http://www.blogger.com/img/share_buttons_20_2.png) !important; background-position: -20px 0px !important; background-repeat: no-repeat no-repeat !important; display: inline-block; height: 20px; margin-left: -1px; overflow: hidden; position: relative; text-decoration: none; width: 20px;&quot; target=&quot;_blank&quot; title=&quot;BlogThis!&quot;&gt;&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;BlogThis!&lt;/span&gt;&lt;/a&gt;&lt;a class=&quot;goog-inline-block share-button sb-twitter&quot; href=&quot;http://www.blogger.com/share-post.g?blogID=92377218009570869&amp;amp;postID=3490343680557734416&amp;amp;target=twitter&quot; style=&quot;background-image: url(http://www.blogger.com/img/share_buttons_20_2.png) !important; background-position: -40px 0px !important; background-repeat: no-repeat no-repeat !important; display: inline-block; height: 20px; margin-left: -1px; overflow: hidden; position: relative; text-decoration: none; width: 20px;&quot; target=&quot;_blank&quot; title=&quot;Share to Twitter&quot;&gt;&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Sh&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elias-chatzigeorgiou.blogspot.com/feeds/810571889790436515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/08/wednesday-january-7-2009-copied-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/810571889790436515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/810571889790436515'/><link rel='alternate' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/08/wednesday-january-7-2009-copied-from.html' title='Fixing PRIMARY KEY constraint issues in SQL Server 2005 Replication'/><author><name>Elias Chatzigeorgiou</name><uri>http://www.blogger.com/profile/10701710618830629222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-203776310350862215.post-7070097170403191185</id><published>2012-02-09T09:30:00.000-08:00</published><updated>2012-02-09T09:34:34.902-08:00</updated><title type='text'>vSphere Client over SSH Tunnel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;ports 443, 902 and 903 forwarded to the Service Console IP on the host.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;--BEGIN OF VMWARE SECRECY--&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
vshpere would NOT accept either &lt;span style=&quot;color: red;&quot;&gt;localhost or 127.0.0.X&lt;/span&gt; in the login prompt !&lt;br /&gt;
&lt;br /&gt;
you need to add a line to the C:\WINDOWS\system32\drivers\etc\hosts file:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;127.0.0.1 esxserver&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;--END OF VMWARE SECRECY--&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;for more details, you may check:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; clear: none; font-family: Arial, Helvetica, sans-serif; font-weight: normal; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: red; font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1012382&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;TCP and UDP Ports required to access vCenter Server, ESX hosts, and other network components&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elias-chatzigeorgiou.blogspot.com/feeds/7070097170403191185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/02/vsphere-client-over-ssh-tunnel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/7070097170403191185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/7070097170403191185'/><link rel='alternate' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/02/vsphere-client-over-ssh-tunnel.html' title='vSphere Client over SSH Tunnel'/><author><name>Elias Chatzigeorgiou</name><uri>http://www.blogger.com/profile/10701710618830629222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-203776310350862215.post-1396275830202831049</id><published>2012-01-04T09:31:00.001-08:00</published><updated>2012-01-04T09:32:42.618-08:00</updated><title type='text'>GRUB2 hangs on &quot;Welcome to GRUB!&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;h2 class=&quot;content-title&quot; style=&quot;color: #444444; font-family: &#39;Gill sans&#39;, &#39;Trebuchet MS&#39;, Helvetica, Tahoma, sans-serif; font-size: 2em; font-weight: normal; line-height: 1.2em; margin: 0px 0px 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;GRUB2 hangs on &quot;Welcome to GRUB!&quot;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;node node-page&quot; id=&quot;node-336&quot; style=&quot;margin-bottom: 1.5em;&quot;&gt;&lt;div class=&quot;node-body&quot;&gt;&lt;div class=&quot;node-title clear-block&quot;&gt;&lt;div class=&quot;submitted&quot; style=&quot;background-clip: initial; background-image: none; background-origin: initial; float: none; margin: 0px; position: static; right: 14px; top: -14px;&quot;&gt;&lt;div style=&quot;margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Roberto  Bifulco&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; —&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;date&quot;&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;Sat, 09/11/2010 - 21:42&amp;nbsp;&amp;nbsp; ( &lt;/span&gt;&lt;a href=&quot;http://robertobifulco.it/node/336&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;http://robertobifulco.it/node/336&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; edited by Elias Chatzigeorgiou :)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;—&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;date&quot;&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: 0.9em;&quot;&gt;Wed&lt;/span&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;, 0&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: 0.9em;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: 0.9em;&quot;&gt;01&lt;/span&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;/201&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: 0.9em;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;  -&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot; style=&quot;font-size: 0.9em;&quot;&gt;19&lt;/span&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;span style=&quot;font-size: 0.9em;&quot;&gt;30 (&lt;/span&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://elias-chatzigeorgiou.blogspot.com/2012/01/grub2-hangs-on-welcome-to-grub.html&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;http://elias-chatzigeorgiou.blogspot.com/2012/01/grub2-hangs-on-welcome-to-grub.html&lt;/span&gt;&lt;/a&gt;&amp;nbsp;)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;content&quot; style=&quot;background-clip: initial; background-image: none; background-origin: initial; font-size: 1em; margin: 0.5em 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;background-color: #fcfcfa; font: normal normal normal 14px/20px helvetica, arial, clean, sans-serif; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Today  i played with debian &quot;squeeze&quot;, that is currently under test and is the next  Debian release. I encountered some problems while installing GRUB2 using the  Debian Installer from a USB pen, infact i had to switch to a kubuntu live  edition in order to install grub2 manually to enable the boot procedure without  the live media (that in my case was again a USB pen).&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font: normal normal normal 12px/20px Arial, Verdana, sans-serif; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Unfortunately  on system reboot i found GRUB2 hang on the &quot;Welcome to GRUB!&quot; message. After  some research on Google i came with this BUG:&amp;nbsp;&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594967&quot; style=&quot;color: #1f5ca1; text-decoration: none;&quot;&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594967&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font: normal normal normal 12px/20px Arial, Verdana, sans-serif; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;The  problem is in the GRUB graphical console, so it was sufficient to:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font: normal normal normal 12px/20px Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;ol style=&quot;margin: 0.75em 0px 1.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;boot the system again through the live  distribution&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;mount  the linux partition (e.g. /dev/sda5)&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;pre class=&quot;bbcodeblock&quot; dir=&quot;ltr&quot; style=&quot;background-color: #e6e6e6; border-bottom-color: initial; border-bottom-style: inset; border-bottom-width: 1px; border-image: initial; border-left-color: initial; border-left-style: inset; border-left-width: 1px; border-right-color: initial; border-right-style: inset; border-right-width: 1px; border-top-color: initial; border-top-style: inset; border-top-width: 1px; font-size: 13px; height: 58px; line-height: normal; margin-right: -99999px; overflow-x: auto; overflow-y: auto; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px; width: 707px;&quot;&gt;&lt;div&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;mkdir /mnt/sda5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;/span&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;mount /dev/sda5 /mnt/sda5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;mount --bind /dev, /sys and /proc so that you will retain them after the  chroot&lt;pre class=&quot;bbcodeblock&quot; dir=&quot;ltr&quot; style=&quot;background-color: #e6e6e6; border-bottom-color: initial; border-bottom-style: inset; border-bottom-width: 1px; border-image: initial; border-left-color: initial; border-left-style: inset; border-left-width: 1px; border-right-color: initial; border-right-style: inset; border-right-width: 1px; border-top-color: initial; border-top-style: inset; border-top-width: 1px; font-size: 13px; height: 81px; line-height: normal; margin-right: -99999px; overflow-x: auto; overflow-y: auto; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px; width: 707px;&quot;&gt;&lt;div&gt;mount --bind /dev /mnt/&lt;span class=&quot;315521717-04012012&quot;&gt;sda5&lt;/span&gt;/dev&lt;/div&gt;&lt;div&gt;&lt;div&gt;mount --bind /&lt;span class=&quot;315521717-04012012&quot;&gt;sys&lt;/span&gt; /mnt/&lt;span class=&quot;315521717-04012012&quot;&gt;sda5&lt;/span&gt;/&lt;span class=&quot;315521717-04012012&quot;&gt;sys&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;mount --bind /&lt;span class=&quot;315521717-04012012&quot;&gt;proc&lt;/span&gt; /mnt/sda5/&lt;span class=&quot;315521717-04012012&quot;&gt;proc&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;do the chroot&lt;pre class=&quot;bbcodeblock&quot; dir=&quot;ltr&quot; style=&quot;background-color: #e6e6e6; border-bottom-color: initial; border-bottom-style: inset; border-bottom-width: 1px; border-image: initial; border-left-color: initial; border-left-style: inset; border-left-width: 1px; border-right-color: initial; border-right-style: inset; border-right-width: 1px; border-top-color: initial; border-top-style: inset; border-top-width: 1px; font-size: 13px; height: 49px; line-height: normal; margin-right: -99999px; overflow-x: auto; overflow-y: auto; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px; width: 707px;&quot;&gt;&lt;div&gt;&lt;span class=&quot;315521717-04012012&quot;&gt;chroot &lt;/span&gt;/mnt/&lt;span class=&quot;315521717-04012012&quot;&gt;sda5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span class=&quot;315521717-04012012&quot;&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;modify the configuration of  GRUB2 (/etc/deafult/grub) &amp;nbsp;to uncomment&amp;nbsp;GRUB_TERMINAL=console&lt;/li&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;update the GRUB configuration  (update-grub)&lt;/li&gt;
&lt;li style=&quot;margin: 0.15em 0px 0.15em 2em;&quot;&gt;reboot the system&lt;/li&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Booting  GRUB from text console solved the problem, and now the system is correctly  working.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Here  you can found a guide to configure/install GRUB from a live distribution, in  case you need it:&amp;nbsp;&lt;a href=&quot;https://wiki.ubuntu.com/Grub2&quot; style=&quot;color: #1f5ca1; text-decoration: none;&quot;&gt;https://wiki.ubuntu.com/Grub2&lt;/a&gt;&amp;nbsp;(Recover  GRUB2 via Live CD paragraph)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elias-chatzigeorgiou.blogspot.com/feeds/1396275830202831049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/01/grub2-hangs-on-welcome-to-grub.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/1396275830202831049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/1396275830202831049'/><link rel='alternate' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2012/01/grub2-hangs-on-welcome-to-grub.html' title='GRUB2 hangs on &quot;Welcome to GRUB!&quot;'/><author><name>Elias Chatzigeorgiou</name><uri>http://www.blogger.com/profile/10701710618830629222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-203776310350862215.post-6763356542870847081</id><published>2010-08-16T02:49:00.000-07:00</published><updated>2010-08-16T03:03:58.701-07:00</updated><title type='text'>otrs -- batch create new customers</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;In case you don&#39;t know, OTRS is a ticketing system for&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;with many features to manage customer telephone calls and e-mails. For more info see&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.otrs.org/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;http://www.otrs.org/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Working with version 2.4 I realized that there was no option for batch customer import. On the other hand the APIs where sitting there, and there was even a script for user creation (otrs.adduser). Thus I decided to roll-out my own otrs.addCustomerUser:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Enjoy:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt; &lt;span style=&quot;color: #a020f0;&quot;&gt;#!/usr/bin/perl -w&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# --&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# otrs.addCustomerUser - Add User from CLI&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# Copyright (C) elias chatzigeorgiou (echatzig@gmail.com)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# --&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# based on: otrs.addUser,v 1.17 2009/04/23 13:47:27 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# --&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# This program is free software; you can redistribute it and/or modify&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# it under the terms of the GNU AFFERO General Public License as published by&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# the Free Software Foundation; either version 3 of the License, or&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# any later version.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# This program is distributed in the hope that it will be useful,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&amp;nbsp;&amp;nbsp;See the&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# GNU General Public License for more details.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# You should have received a copy of the GNU Affero General Public License&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# along with this program; if not, write to the Free Software&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA&amp;nbsp;&amp;nbsp;02111-1307&amp;nbsp;&amp;nbsp;USA&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# or see &lt;a href=&quot;http://www.gnu.org/licenses/agpl.txt.&quot;&gt;http://www.gnu.org/licenses/agpl.txt.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# --&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use strict&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use warnings&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;File::Basename;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;FindBin &lt;span style=&quot;color: magenta;&quot;&gt;qw(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;$RealBin&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use lib&lt;/b&gt;&lt;/span&gt;&amp;nbsp;dirname(&lt;span style=&quot;color: teal;&quot;&gt;$RealBin&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use lib&lt;/b&gt;&lt;/span&gt;&amp;nbsp;dirname(&lt;span style=&quot;color: teal;&quot;&gt;$RealBin&lt;/span&gt;) . &lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;/Kernel/cpan-lib&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use vars&lt;/b&gt;&lt;/span&gt;&amp;nbsp;qw (&lt;span style=&quot;color: teal;&quot;&gt;%opts&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Getopt::Std;&lt;br /&gt;
getopt( &lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;flpge&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;, &lt;span style=&quot;color: teal;&quot;&gt;\%opts&lt;/span&gt;&amp;nbsp;);&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;unless&lt;/b&gt;&lt;/span&gt;&amp;nbsp;( &lt;span style=&quot;color: teal;&quot;&gt;$ARGV&lt;/span&gt;[&lt;span style=&quot;color: magenta;&quot;&gt;0&lt;/span&gt;] ) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;$FindBin::Script&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&amp;nbsp;[-f firstname] [-l lastname] [-p password] [-g groupname] [-e email] username&lt;/span&gt;&lt;span style=&quot;color: slateblue;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: slateblue;&quot;&gt;\t&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;if you define -g with a valid group name then the user will be added that group&lt;/span&gt;&lt;span style=&quot;color: slateblue;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: slateblue;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::Config;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::Encode;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::Log;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::Time;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::Main;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::DB;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;use &lt;/b&gt;&lt;/span&gt;Kernel::System::CustomerUser;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;# create common objects&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;&amp;nbsp;= ();&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{ConfigObject} = Kernel::Config-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{EncodeObject} = Kernel::System::Encode-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{LogObject}&amp;nbsp;&amp;nbsp;= Kernel::System::Log-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;( &lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;, &lt;span style=&quot;color: magenta;&quot;&gt;LogPrefix &lt;/span&gt;=&amp;gt; &lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;otrs.addUser&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&amp;nbsp;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{TimeObject} = Kernel::System::Time-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{MainObject} = Kernel::System::Main-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{DBObject}&amp;nbsp;&amp;nbsp; = Kernel::System::DB-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{UserObject} = Kernel::System::CustomerUser-&amp;gt;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;%CommonObject&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;%Param&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;undef&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;%Param&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#user id of the person adding the record&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserID} = &lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#Validrecord&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{ValidID} = &lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{Source}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= &lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;CustomerUser&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&#39;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserFirstname} = &lt;span style=&quot;color: teal;&quot;&gt;$opts&lt;/span&gt;{f};&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserLastname}&amp;nbsp;&amp;nbsp;= &lt;span style=&quot;color: teal;&quot;&gt;$opts&lt;/span&gt;{l};&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserCustomerID}= &lt;span style=&quot;color: teal;&quot;&gt;$ARGV&lt;/span&gt;[&lt;span style=&quot;color: magenta;&quot;&gt;0&lt;/span&gt;];&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserLogin}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;span style=&quot;color: teal;&quot;&gt;$ARGV&lt;/span&gt;[&lt;span style=&quot;color: magenta;&quot;&gt;0&lt;/span&gt;];&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserPassword}&amp;nbsp;&amp;nbsp;= &lt;span style=&quot;color: teal;&quot;&gt;$opts&lt;/span&gt;{p};&lt;br /&gt;
&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UserEmail}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;span style=&quot;color: teal;&quot;&gt;$opts&lt;/span&gt;{e};&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;=item CustomerUserAdd()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;to add new customer users&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;my $UserLogin = $CustomerUserObject-&amp;gt;CustomerUserAdd(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; &#39;CustomerUser&#39;, # CustomerUser source config&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserFirstname&amp;nbsp;&amp;nbsp;=&amp;gt; &#39;Huber&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserLastname&amp;nbsp;&amp;nbsp; =&amp;gt; &#39;Manfred&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserCustomerID =&amp;gt; &#39;A124&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserLogin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; &#39;mhuber&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserPassword&amp;nbsp;&amp;nbsp; =&amp;gt; &#39;some-pass&#39;, # not required&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserEmail&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; &#39;email@example.com&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ValidID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; 1,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; 123,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;=cut&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;( &lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;{UID} = &lt;span style=&quot;color: teal;&quot;&gt;$CommonObject&lt;/span&gt;{UserObject}-&amp;gt;CustomerUserAdd( &lt;span style=&quot;color: teal;&quot;&gt;%Param&lt;/span&gt;, &lt;span style=&quot;color: magenta;&quot;&gt;ChangeUserID &lt;/span&gt;=&amp;gt; &lt;span style=&quot;color: magenta;&quot;&gt;1&lt;/span&gt;&amp;nbsp;) ) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;User added. user&amp;nbsp;&amp;nbsp;id is &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;$Param&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;{UID}&lt;/span&gt;&lt;span style=&quot;color: slateblue;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #804040;&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;0&lt;/span&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;hr /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://elias-chatzigeorgiou.blogspot.com/feeds/6763356542870847081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2010/08/otrs-batch-create-new-customers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/6763356542870847081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/203776310350862215/posts/default/6763356542870847081'/><link rel='alternate' type='text/html' href='http://elias-chatzigeorgiou.blogspot.com/2010/08/otrs-batch-create-new-customers.html' title='otrs -- batch create new customers'/><author><name>Elias Chatzigeorgiou</name><uri>http://www.blogger.com/profile/10701710618830629222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>