<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ejs &#187; My job</title>
	<atom:link href="http://ejs.seniejitrakai.net/category/my-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejs.seniejitrakai.net</link>
	<description>a snaphot of time</description>
	<lastBuildDate>Mon, 09 Jan 2012 22:10:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using Revit Server 2012 by non-domain members</title>
		<link>http://ejs.seniejitrakai.net/2012/01/09/using-revit-server-2012-by-non-domain-members/</link>
		<comments>http://ejs.seniejitrakai.net/2012/01/09/using-revit-server-2012-by-non-domain-members/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 21:47:37 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[My job]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[credentials]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[Revit]]></category>
		<category><![CDATA[Revit Server]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=231</guid>
		<description><![CDATA[The last issue in the Migration Hell was Revit Server. To be precise, not the application itself, but the client authentification. With all it&#8217;s bells-n-whistles, it lacks most part of the documentation. The application itself runs on IIS, uses Windows (NTLM) or Basic authentification, but nothing is said about the Revit client. The only thing [...]]]></description>
			<content:encoded><![CDATA[<p>The last issue in the Migration Hell was Revit Server. To be precise, not the application itself, but the client authentification.<br />
With all it&#8217;s bells-n-whistles, it lacks most part of the documentation. The application itself runs on IIS, uses Windows (NTLM) or Basic authentification, but nothing is said about the Revit client. The only thing you can find &#8211; you must login as domain member to use the Revit Server.</p>
<p>It&#8217;s not true. You should, but must not.</p>
<p>Two things must be done on the client to use Revit Server:</p>
<ol>
<li><em>authenticate in the domain and <strong>every server</strong></em> you will need to use. You must use your domain login credentials to authentificate. The AD domain uses trust relations to authentificate you in the domain servers. If you prefer not to login to AD domain, you must take care of it by yourself</li>
<li>change environment variables.
<ul>
<li>%USERDOMAIN% point to the current domain,  if logged as domain member. If not, it&#8217;s pointing to the computer name. Setting the variable to the domain name needed (eg. SET USERDOMAIN=MYCOMPANY) will do the job. You should not use DNS domain name, eg. MyCompany.COM, it&#8217;s set in %USERDNSDOMAIN% and is useless in the case of Revit Server</li>
<li> %USERNAME% must be set to your AD&#8217;s username, without AD prefix or FQDN suffix. Eg. if your AD domain login is mycompany.com\PerfectUser or PerfectUser@Mycompany.COM, use &#8220;SET USERNAME=PerfectUser&#8221;.</li>
</ul>
</li>
</ol>
<p>That&#8217;s all. Enjoy.</p>
<p>PS: if you use Local Revit Server, and Central Server is located somewere in the Other Domain, you will probably need to authentificate to the Central Revit Server too. Not sure about this.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2012/01/09/using-revit-server-2012-by-non-domain-members/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pull</title>
		<link>http://ejs.seniejitrakai.net/2011/12/12/pull/</link>
		<comments>http://ejs.seniejitrakai.net/2011/12/12/pull/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 23:35:53 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[My job]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=221</guid>
		<description><![CDATA[is the only missing keyword, OpenVPN client-to-server config need to work correctly on the client. It took me 3 days to figure this out, a lot of RTFM&#8217;ing and head-banging. Full client config looks this way: tls-client pull remote vpn.xxx.xxx dev tun ifconfig 10.0.232.2 10.0.232.1 cert [full-path-to-client's-CRT-file] key [full-path-to-client's-KEY-file] ca [full-path-to-server's-CA-CRT-file] comp-lzo persist-key persist-tun Server [...]]]></description>
			<content:encoded><![CDATA[<p>is the only missing keyword, OpenVPN client-to-server config need to work correctly on the client.<br />
It took me 3 days to figure this out, a lot of RTFM&#8217;ing and head-banging.</p>
<p>Full client config looks this way:<br />
<script type="text/javascript"><!--
google_ad_client = "pub-5014333663142840";
google_ad_slot = "2728381536";
google_ad_width = 728;
google_ad_height = 90;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<span id="more-221"></span></p>
<blockquote><p>
tls-client<br />
pull<br />
remote vpn.xxx.xxx<br />
dev tun<br />
ifconfig 10.0.232.2 10.0.232.1<br />
cert [full-path-to-client's-CRT-file]<br />
key [full-path-to-client's-KEY-file]<br />
ca [full-path-to-server's-CA-CRT-file]<br />
comp-lzo<br />
persist-key<br />
persist-tun
</p>
</blockquote>
<p>Server config is similar:</p>
<blockquote><p>
port 1194<br />
proto udp<br />
dev tun<br />
ca ca.crt<br />
cert vpn-server.crt<br />
dh dh1024.pem<br />
server 10.0.232.0 255.255.255.0<br />
ifconfig-pool-persist ipp.txt<br />
push &#8220;route 192.168.232.0 255.255.255.0&#8243;<br />
client-config-dir ccd<br />
push &#8220;dhcp-option DNS 10.0.232.1&#8243;<br />
keepalive 10 120<br />
comp-lzo<br />
max-clients 10<br />
user nobody<br />
group daemon<br />
persist-key<br />
persist-tun<br />
status openvpn-status.log<br />
log-append  openvpn.log<br />
verb 3
</p>
</blockquote>
<p>there&#8217;s nothing and in ccd/client.</p>
<p>The worst thing was, i could find no solution for My-Link-Not-Working on the Internet:<br />
Both ends use &#8216;tun&#8217;, the subnets are set correctly, i could even see packets arrivint to the VPN end on port 1194.<br />
But no traffic on &#8216;tun0&#8242;, no ping, no connection. That was kind of strange. I was already to swith to &#8216;tap&#8217; adapter and proceed to bridging, but fortunatelly i&#8217;ve read what &#8216;pull&#8217; means in OpenVPN &#8211; &#8220;This option must be used on a client which is connecting to a multi-client server. It indicates to OpenVPN that it should accept options pushed by the server, provided they are part of the legal set of pushable options (note that the &#8211;pull option is implied by &#8211;client ).&#8221;</p>
<p>No idea why, but:<br />
 routes were correctly set on both ends;<br />
 the firewall was not an issue both on Linux and windows sides;<br />
 the magical &#8220;pull&#8221; made the work done.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2011/12/12/pull/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPsec to Sonicwall appliance</title>
		<link>http://ejs.seniejitrakai.net/2011/12/06/ipsec-to-sonicwall-appliance/</link>
		<comments>http://ejs.seniejitrakai.net/2011/12/06/ipsec-to-sonicwall-appliance/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 21:54:37 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[My job]]></category>
		<category><![CDATA[IPsec]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=222</guid>
		<description><![CDATA[Just a note: when you need to establish IPsec connection to Sonicwall NSA 3500 firewall, here&#8217;s working config: Linux side: /etc/ipsec.conf : &#8230; include /etc/ipsec.d/*.conf Not sure if &#8216;agressive mode&#8217; is A Good Idea, but it Just Works /etc/ipsec.d/partner.conf : conn partner type=tunnel left=$YOUR_PUBLIC_IP leftid=$YOUR_PUBLIC_IP leftsubnet=$YOUR_PRIVATE_SUBNET/WITH_MASK right=$PARTNER&#8217;S_PUBLIC_IP rightid=$PARTNER&#8217;S_PUBLIC_IP rightsubnet=$PARTHENR&#8217;S_PRIVATE_SUBNET/WITH_MASK rightnexthop=$PARTHENR&#8217;S_ROUTER_IP keyingtries=0 pfs=yes aggrmode=yes auto=add auth=esp [...]]]></description>
			<content:encoded><![CDATA[<p>Just a note:<br />
when you need to establish IPsec connection to Sonicwall NSA 3500 firewall, here&#8217;s working config:<br />
Linux side:<br />
/etc/ipsec.conf :</p>
<blockquote><p>
&#8230;<br />
include /etc/ipsec.d/*.conf
</p></blockquote>
<p><span id="more-222"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5014333663142840";
google_ad_slot = "8842048914";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
Not sure if &#8216;agressive mode&#8217; is A Good Idea, but it Just Works<br />
/etc/ipsec.d/partner.conf :</p>
<blockquote><p>conn partner<br />
        type=tunnel<br />
        left=$YOUR_PUBLIC_IP<br />
        leftid=$YOUR_PUBLIC_IP<br />
        leftsubnet=$YOUR_PRIVATE_SUBNET/WITH_MASK<br />
        right=$PARTNER&#8217;S_PUBLIC_IP<br />
        rightid=$PARTNER&#8217;S_PUBLIC_IP<br />
        rightsubnet=$PARTHENR&#8217;S_PRIVATE_SUBNET/WITH_MASK<br />
        rightnexthop=$PARTHENR&#8217;S_ROUTER_IP<br />
        keyingtries=0<br />
        pfs=yes<br />
        aggrmode=yes<br />
        auto=add<br />
        auth=esp<br />
        esp=3DES-SHA1<br />
        ike=3DES-SHA1<br />
        authby=secret
</p></blockquote>
<p>/etc/ipsec.secrets</p>
<blockquote><p>
$YOUR_PUBLIC_IP $PARTNER&#8217;S_PUBLIC_IP : PSK &#8220;verySecretPreSharedKey&#8221;
</p></blockquote>
<p>If it&#8217;s the very first time you are adding the connection, use</p>
<blockquote><p>
ipsec auto &#8211;add partner
</p></blockquote>
<p>If you are editing the existing connection, use</p>
<blockquote><p>
ipsec auto &#8211;replace partner
</p></blockquote>
<p>Now, restart IPsec and initiate connection</p>
<blockquote><p>
/etc/init.d/ipsec start<br />
ipsec whack &#8211;name partner &#8211;initiate
</p></blockquote>
<p>Ah yes, routing:</p>
<blockquote><p>
ip route add $PARTHENR&#8217;S_PRIVATE_SUBNET/WITH_MASK via $YOUR_PUBLIC_IP src $YOUR_PRIVATE_IP
</p></blockquote>
<p>SonicWall should be set the same way:</p>
<blockquote><p>
Policy: site-to-site;<br />
Authentication Method: IKE using Preshared Secret<br />
IPSec Primary Gateway Name or Address: $YOUR_PUBLIC_IP<br />
Local IKE ID: IP Address, $PARTNER&#8217;S_PUBLIC_IP<br />
Peer IKE ID: IP Address, $YOUR_PUBLIC_IP</p>
<p>IKE (Phase 1) proposal:<br />
Excahnge: Aggressive mode<br />
Encryption: 3DES<br />
Authentication: SHA1<br />
Life Time (seconds) 28800</p>
<p>IPsec (Phase 2) Proposal:<br />
Protocol: ESP<br />
Encryption: 3DES<br />
Authentication: SHA1
</p></blockquote>
<p>Again, not sure if &#8216;Aggressive mode&#8217; is A Good Idea.</p>
<p>References:<br />
<a href="http://www.sonicwall.com/us/products/NSA_3500.html" title="SonicWall NSA 3500" target="_blank">SonicWall NSA 3500</a><br />
<a href="http://www.ghacks.net/2010/03/03/creating-a-vpn-tunnel-between-ubuntu-and-sonicwall/" title="Linux to Sonicwall" target="_blank">Linux to Sonicwall</a> and <a href="http://www.linux-faqs.info/vpn/establish-a-vpn-connection-between-sonicwall-and-linux" title="Linux to Sonicwall" target="_blank">also here</a><br />
<a href="http://www.pelagodesign.com/blog/2009/05/18/ubuntu-linux-how-to-setup-a-vpn-connection-to-a-sonicwall-router-using-openswan-and-pre-shared-keys-psk/" title="Linux to SonicWall TZ190" target="_blank">Linux to SonicWall TZ190</a><br />
<a href="http://linux.die.net/man/5/ipsec.conf" title="ipsec.conf (5)" target="_blank">ipsec.conf (5)</a><br />
<a href="http://www.sherman.ca/archives/2004/11/21/linux-26-ipsec-vpns/" title="IPsec VPN routing" target="_blank">IPsec VPN routing</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2011/12/06/ipsec-to-sonicwall-appliance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of removed packages in Debian</title>
		<link>http://ejs.seniejitrakai.net/2011/03/04/get-rid-of-removed-packages-in-debian/</link>
		<comments>http://ejs.seniejitrakai.net/2011/03/04/get-rid-of-removed-packages-in-debian/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 11:44:52 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[My job]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=198</guid>
		<description><![CDATA[Every time package is removed via `apt-get remove`, a tiny piece of its configuration can be kept in your system. If you ever need to reinstall the package, this information can be re-used. These packages has status &#8216;rc&#8217; in the output of `dpkg -l`. But if you want to keep your system tidy and clean, [...]]]></description>
			<content:encoded><![CDATA[<p>Every time package is removed via `apt-get remove`, a tiny piece of its configuration can be kept in your system. If you ever need to reinstall the package, this information can be re-used. These packages has status &#8216;rc&#8217; in the output of `dpkg -l`. But if you want to keep your system tidy and clean, you may want them to be removed.</p>
<p>The miraculous command is</p>
<blockquote><p>dpkg -l | egrep ^r | cut -d &#8216; &#8216; -f 3 | xargs apt-get remove &#8211;purge -y</p></blockquote>
<p><span id="more-198"></span></p>
<p>What it does?</p>
<blockquote><p>dpkg -l</p></blockquote>
<p>list all packages</p>
<blockquote><p>egrep ^r</p></blockquote>
<p>print only those matching status &#8216;r*&#8217;. Package status is the first column, so add &#8216;^&#8217; to match only the lines, beginning with &#8216;r&#8217; symbol.</p>
<blockquote><p>cut -d &#8216; &#8216; -f 3</p></blockquote>
<p>return selected field only. Usually I add field separator symbol with &#8216;-d&#8217; option and specify field number with &#8216;-f&#8217;</p>
<blockquote><p>xargs apt-get remove &#8211;purge -y</p></blockquote>
<p>xargs runs the specified command, appending input from STDIN (you can alter this behaviour vith options). In this case, i&#8217;m executing &#8216;apt-get remove &#8211;purge&#8217; command. &#8216;-y&#8217; swich means &#8221;assume &#8216;yes&#8217; to all questions&#8221; and is needed for apt-get to confirm the removal of packages.</p>
<p>The rest is the magic of pipes.</p>
<p>&nbsp;</p>
<p>Why do i write this?</p>
<p>A strange messages were found in the syslog:</p>
<pre>Errors when running cron:
    grandchild #2047 failed with exit status 1: 1 Time(s)
    grandchild #2205 failed with exit status 1: 1 Time(s)
    grandchild #2342 failed with exit status 1: 1 Time(s)
    grandchild #2658 failed with exit status 1: 1 Time(s)
    grandchild #2878 failed with exit status 1: 1 Time(s)
    grandchild #2972 failed with exit status 1: 1 Time(s)
    grandchild #30732 failed with exit status 1: 1 Time(s)
    grandchild #30832 failed with exit status 1: 1 Time(s)
    grandchild #30934 failed with exit status 1: 1 Time(s)
    grandchild #3094 failed with exit status 1: 1 Time(s)
    grandchild #31290 failed with exit status 1: 1 Time(s)
    grandchild #32395 failed with exit status 1: 1 Time(s)
    grandchild #3262 failed with exit status 1: 1 Time(s)
</pre>
<p>In-deep analysis revealed &#8216;/etc/cron.d/greylistclean&#8217; from package &#8216;sa-exim&#8217;. I don&#8217;t use exim and it was replaced by postfix just after installing the system. The file mentioned did not show any signs of miss-formatting until a new version of cron daemon was installed via &#8216;apt-get dist-upgrade&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2011/03/04/get-rid-of-removed-packages-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running VirtualBox guests from physical drive</title>
		<link>http://ejs.seniejitrakai.net/2010/11/01/running-virtualbox-guests-from-physical-drive/</link>
		<comments>http://ejs.seniejitrakai.net/2010/11/01/running-virtualbox-guests-from-physical-drive/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 22:38:28 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Hobbies]]></category>
		<category><![CDATA[My job]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=175</guid>
		<description><![CDATA[Dual boot is perfect solution in most cases. On the other hand, if you need to peep into the other system&#8217;s files, you need to re-boot. Or use sometimes not so stable filesystem utilities. Running fully virtualized OS, using eg Xen as supervisor, creates additional load an hardware, maybe not too big when running multiple [...]]]></description>
			<content:encoded><![CDATA[<p>Dual boot is perfect solution in most cases.</p>
<p>On the other hand, if you need to peep into the other system&#8217;s files, you need to re-boot. Or use sometimes not so stable filesystem utilities.<br />
Running fully virtualized OS, using eg Xen as supervisor, creates additional load an hardware, maybe not too big when running multiple OS&#8217;es on the pretty new server, but significant, if it is a laptop. And yes, you NEED to keep data in-sync between virtual and real OS.<span id="more-175"></span><br />
VMware users, please don&#8217;t read any more. Yes, you can do it from pre-historic times.</p>
<p>You&#8217;ve been warned!</p>
<p>As for VirtualBox, it is possible to add physical drive or disk partition to your VM setup, although no GUI tools exists to accomplish this.<br />
Every step is documented in VirtualBox User&#8217;s Guide, but really, who read these guides?<br />
So , excerpts from <a href="http://www.virtualbox.org/manual/ch09.html#rawdisk">The Guide, chapter 9</a>:</p>
<p><strong>Step 1:</strong> you need to know the partition layout of the drive.</p>
<p><code>VBoxManage internalcommands listpartitions -rawdisk [physical_drive]</code></p>
<p>Substitute [physical_drive] for <strong>/dev/sd[a-z]</strong> if you live in Linux, <strong>\\.\PhysicalDrive[0..n]</strong> living in windows or <strong>/dev/drive[1..n]</strong> living in OS X.<br />
Note the numbers. Linux usually has partition type 0&#215;83, windows &#8211; 0&#215;07. Not sure about Mac. You need to remember the physical partition you want to use in guest OS.</p>
<p><strong>Step 2:</strong> export it to a file. It&#8217;s as easy as 1-2-3. And no, not the whole partition, but only some information about the layout of partitions will be saved:</p>
<p><code>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions [partition_number] -register</code></p>
<p><strong>/path/to/file.vmdk</strong> must be absolute path. Substitute <strong>[partition_number]</strong> with the the partition from step 1. Using &#8220;-register&#8221; automagically registers the image in list of registered images of the VirtualBox.</p>
<p>&nbsp;</p>
<p><strong>Step 3:</strong> attach the newly created file to a guest and run it.</p>
<p><strong>Some notes:</strong> it&#8217;s possible to use entire physical disk for VirtualBox:<br />
<code>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk [physical_drive]</code><br />
Although it is possible, you should ever never launch the currently running system in VirtualBox. You&#8217;ve been warned.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2010/11/01/running-virtualbox-guests-from-physical-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migration hell: moving printers in Windows</title>
		<link>http://ejs.seniejitrakai.net/2010/10/20/migration-hell-moving-printers/</link>
		<comments>http://ejs.seniejitrakai.net/2010/10/20/migration-hell-moving-printers/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 00:28:26 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[My job]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=164</guid>
		<description><![CDATA[Our campus, Faculty of Architecture, VGTU is moving to the totally new subnet. As we use DHCP for IP distribution, no real problems except `sed` are going to appear. The pleasing moment is we are getting a fresh IP range. The headache is TCP/IP printers. WPKG has good printer addition/ installation guide in http://wpkg.org/Printer_configuration , [...]]]></description>
			<content:encoded><![CDATA[<p>Our campus, <a href="http://www.ar.vgtu.lt">Faculty of Architecture</a>, <a href="http://www.vgtu.lt">VGTU</a> is moving to the totally new subnet. As we use DHCP for IP distribution, no real problems except `sed` are going to appear.<br />
The pleasing moment is we are getting a fresh IP range.<br />
The headache is TCP/IP printers.</p>
<p>WPKG has good printer addition/ installation guide in http://wpkg.org/Printer_configuration , but it does not cover changing IP port numbers.<br />
As a CEO on all computer infrastructure, I need to find any solution to make the movement smoothly.</p>
<p>I was unable to find a ready-made solution, and in-house tool appeared after several hours in the Net.<br />
I need to apologize for bugs and errors, as it is the first (and hopefully the last) VB script. It uses WMI. Testing box was W7, x64.<br />
Maybe someone will find it useful.</p>
<p>Call the file <strong>chprinterport.vbs</strong><span id="more-164"></span><br />
<code><br />
Set args = WScript.Arguments<br />
if args.Count < 2 then<br />
	Wscript.Echo " "<br />
	Wscript.Echo " Change IP ports for TCP/IP printers on Windows boxes"<br />
	Wscript.Echo " "<br />
	Wscript.Echo "   Usage: <em>cscript chprinterport.vbs old_TCP/IP_port new_TC/IP_port</em>"<br />
	Wscript.Echo " "<br />
	Wscript.Echo "    eg: cscript chprinterport.vbs 192.168.1.2 192.168.2.3 will change"<br />
	Wscript.Echo "      port IP from 192.168.1.2 to 192.168.2.3"<br />
	Wscript.Echo " "<br />
	Wscript.Echo "    Partial match is possible, so:"<br />
	Wscript.Echo "      cscript chprinterport.vbs 192.168 210.23 will change"<br />
	Wscript.Echo "      port IP from 192.168.x.y to 210.23.x.y"<br />
	Wscript.Echo " "<br />
	Wscript.Echo " Inspired by:"<br />
	Wscript.Echo "   http://wpkg.org/Printer_configuration"<br />
	Wscript.Echo "   http://gallery.technet.microsoft.com/ScriptCenter/en-us/5777dc6a-9783-43d7-ac8e-fd3bd739690c"<br />
	Wscript.Echo "   http://www.pcreview.co.uk/forums/showpost.php?s=8a077fc479806d3fc03bf734d57b357f&#038;p=5622799&#038;postcount=6"<br />
	Wscript.Echo " "<br />
	Wscript.Echo "                                                            License - BSD"<br />
	Wscript.Echo " "<br />
	Wscript.Echo "                           (c) 2010 ejs@seniejitrakai.net, ejs@ar.vgtu.lt"<br />
	Wscript.Echo "                                             http://ejs.seniejitrakai.net"<br />
  else<br />
	oldIPAddress    = args.Item(0)<br />
	newIPAdress = args.Item(1)<br />
        Dim strComputer<br />
        Dim Result<br />
        strComputer = "."<br />
        Result = ""<br />
	Set objWMIService = GetObject("winmgmts:" &#038; _<br />
"{impersonationLevel=impersonate,(LoadDriver)}!\\" &#038; strComputer &#038; _<br />
"\root\cimv2")<br />
	Set colPorts = objWMIService.ExecQuery ("Select * from Win32_TCPIPPrinterPort")<br />
	For Each objPort in colPorts<br />
		wscript.echo "Found TCP/IP printer port: " &#038; objPort.HostAddress  &#038; ", named " &#038; objPort.Name<br />
	if UCase(Mid(objPort.HostAddress, 1, Len(oldIPAddress))) = oldIPAddress Then<br />
		objPort.HostAddress = newIPAdress &#038;  Mid(objPort.HostAddress, Len(oldIPAddress)+1)<br />
		Wscript.Echo "New Printer port: " &#038; objPort.HostAddress<br />
		Result =  objPort.Put_<br />
	    If Len(Result) > 0 Then<br />
			WScript.Echo "Updated TCP/IP printer port: " &#038; objPort.HostAddress &#038; ", named " &#038; objPort.Name<br />
		Else<br />
			WScript.Echo "Error " &#038; Result &#038; " updating TCP/IP printer port: " &#038; objPort.HostAddress<br />
			WScript.Quit<br />
		End If<br />
	 end if<br />
	 Next<br />
end if<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2010/10/20/migration-hell-moving-printers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Localised fonts</title>
		<link>http://ejs.seniejitrakai.net/2010/04/20/localised-fonts/</link>
		<comments>http://ejs.seniejitrakai.net/2010/04/20/localised-fonts/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:17:20 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[My job]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=155</guid>
		<description><![CDATA[The very first try on &#8220;Flux-the-Architect&#8220;. Added Ą,Č,Ę,Ė,Į,Š,Ų,Ū,Ž glyphs and some minor symbols (°, ±, ², ³). The font is OpenType in TrueType encoding. OpenType fonts in PS encoding does not work in AutoCAD.]]></description>
			<content:encoded><![CDATA[<p>The very first try on &#8220;<a href="http://ejs.seniejitrakai.net/wp-content/uploads/FluxArchitect-Regular-TT.otf">Flux-the-Architect</a>&#8220;. Added Ą,Č,Ę,Ė,Į,Š,Ų,Ū,Ž glyphs and some minor symbols (°, ±, ², ³). The font is OpenType in TrueType encoding. OpenType fonts in PS encoding does not work in AutoCAD.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2010/04/20/localised-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubles in Virtual World</title>
		<link>http://ejs.seniejitrakai.net/2010/02/24/troubles-in-virtual-world/</link>
		<comments>http://ejs.seniejitrakai.net/2010/02/24/troubles-in-virtual-world/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:10:36 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=143</guid>
		<description><![CDATA[For testing OpenOffice.org i&#8217;ve set up a VirtualBox, running Debian/testing in x86and amd64 architectures. In some cases, mouse integration does not work correctly. Although mouse works perfectly in the Guest window, it&#8217;s impossible to move it out without pressing Host key (left Ctrl in MS Windows). VirtualBox guest additions are installed, guest resizing and shared [...]]]></description>
			<content:encoded><![CDATA[<p>For testing OpenOffice.org i&#8217;ve set up a VirtualBox, running Debian/testing in x86and amd64 architectures.<br />
In some cases, mouse integration does not work correctly. Although mouse works perfectly in the  Guest window, it&#8217;s impossible to move it out without pressing Host key (left Ctrl in MS Windows).<br />
VirtualBox guest additions are installed, guest resizing and shared folders works perfectly.<br />
The solution was found in <a href="http://forums.virtualbox.org/viewtopic.php?t=10800">VirtualBox forums</a> :<br />
/etc/X11/xorg.conf must contain </p>
<blockquote><p>Section &#8220;InputDevice&#8221;<br />
   Identifier   &#8220;Configured Mouse&#8221;<br />
   Driver       &#8220;vboxmouse&#8221;<br />
   Option       &#8220;CorePointer&#8221;<br />
EndSection</p></blockquote>
<p>note two lines: <strong>vboxmouse</strong> tells X.org to use mouse driver from VirtualBox guest additions, and <strong>CorePointer</strong> instructs to use this pointer as primary. Without <em>CorePointer</em> line the vboxmouse driver is used, but it&#8217;s still impossible to move it outside guest&#8217;s window.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2010/02/24/troubles-in-virtual-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to start multisite Gallery2 on Debian</title>
		<link>http://ejs.seniejitrakai.net/2009/07/11/how-to-start-multisite-gallery2-on-debian/</link>
		<comments>http://ejs.seniejitrakai.net/2009/07/11/how-to-start-multisite-gallery2-on-debian/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 06:35:00 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[My job]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Gallery2]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=45</guid>
		<description><![CDATA[I had a little disc and database crash, so the site was not updated recently. Well, WordPress was updated easily, but i had problems with Gallery2. I need a multisite deployment of Gallery2. Although it is supported from the installer, some important steps are missing. In order multisite Gallery2 to work, you will need to [...]]]></description>
			<content:encoded><![CDATA[<p>I had a little disc and database crash, so the  site was not updated recently.</p>
<p>Well, WordPress was updated easily, but i had problems with Gallery2.</p>
<p>I need a multisite deployment of Gallery2. Although it is supported from the installer, some important steps are missing.</p>
<p>In order multisite Gallery2 to work, you will need to add some symlinks to every deployment of the Gallery2:</p>
<p><span id="more-45"></span></p>
<ul>
<li> lib -&gt; /usr/share/gallery2/lib/</li>
<p>The directory is providing some scripts amongst all, so without it you will lack some functionality, like enabling themes will not work.</p>
<li> modules -&gt; /usr/share/gallery2/modules</li>
<li> themes -&gt; /usr/share/gallery2/themes</li>
<p>The themes directory is providing CSS file, so without this your gallery will look &#8220;flat&#8221;.</ul>
<p>Also, you can try to use &#8220;php_admin_flag safe_mode Off&#8221; in the Apache&#8217;s VirtualHost description, in the case PHP safe mode is turned on globally.</p>
<p>And yes, beware: do not ever mix web directory and data directory: the content of web directory is erased during install.</p>
<p><code># date<br />
Sat Jul 11 10:34:07 EEST 2009<br />
# dpkg -l |egrep gallery2<br />
ii  gallery2                          2.3-1                       web-based photo album written in PHP<br />
</code></p>
<p> The fresh issue: after fresh install (Gallery&#8230; deb), no one is able to login. The solution is explained <a href="http://gallery.menalto.com/node/76322">here</a> &#8211; you should set <code>$gallery->setConfig('baseUri', '');</code> in &#8216;config.php&#8217;.</p>
<p> Again, having both left hands, i was unable to start multisite version of Gallery2, using install scripts. What i had to change was:</p>
<ol>
<li>remove &#8216;lib/&#8217;</li>
<li>symlink &#8216;lib/&#8217; , &#8216;modules/&#8217; , &#8216;themes/&#8217; from &#8216;/usr/share/gallery2&#8242; to site root</li>
<li>symlink or copy and alter &#8216;images/&#8217; from &#8216;/usr/share/gallery2&#8242; to site root</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2009/07/11/how-to-start-multisite-gallery2-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bnx2: Can&#8217;t load firmware file bnx2-06-4.0.5.fw</title>
		<link>http://ejs.seniejitrakai.net/2009/07/06/bnx2-cant-load-firmware-file-bnx2-06-405fw/</link>
		<comments>http://ejs.seniejitrakai.net/2009/07/06/bnx2-cant-load-firmware-file-bnx2-06-405fw/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 20:02:58 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/?p=112</guid>
		<description><![CDATA[After migration from 2.6.18-6-amd64, a newly installed kernel 2.6.26-2-amd64 failed to load: [ 2.871916] Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.7.5 (April 29, 2008) ... [ 3.631838] firmware: requesting bnx2-06-4.0.5.fw ... [ 105.599417] bnx2: Can't load firmware file bnx2-06-4.0.5.fw ... [ 105.599563] bnx2: probe of 0000:03:00.0 failed with error -2 ... [ 106.791394] firmware: [...]]]></description>
			<content:encoded><![CDATA[<p>After migration from 2.6.18-6-amd64, a newly installed kernel 2.6.26-2-amd64 failed to load:<br />
<code><br />
[    2.871916] Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.7.5 (April 29, 2008)<br />
...<br />
[    3.631838] firmware: requesting bnx2-06-4.0.5.fw<br />
<span id="more-112"></span>...<br />
[  105.599417] bnx2: Can't load firmware file bnx2-06-4.0.5.fw<br />
...<br />
[  105.599563] bnx2: probe of 0000:03:00.0 failed with error -2<br />
...<br />
[  106.791394] firmware: requesting bnx2-06-4.0.5.fw<br />
[  203.699607] bnx2: Can't load firmware file bnx2-06-4.0.5.fw<br />
...<br />
[  203.699742] bnx2: probe of 0000:05:00.0 failed with error -2<br />
</code></p>
<p>First of all, firmware is in non-free branch, so /etc/apt/sources.list must contain &#8220;non-free&#8221; repository and:<br />
install firmware-bnx2 package: </p>
<blockquote><p>apt-get install firmware-bnx2</p></blockquote>
<p>;</p>
<p>double check the files in <code>/lib/firmware/</code>;</p>
<p><a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494936">Some people</a> report it&#8217;s still impossible to load firmware from initrd, so you may wish to remove bnx2 line from &#8216;/etc/initramfs-tools/modules&#8217;;</p>
<p>&#8220;firmware-bnx2&#8243; already has initrd update scripts, but you may want to re-check the created image.<br />
You can extract the initrd image using </p>
<blockquote><p>gzip -dc /boot/initrd.img-[]kernel version-arch] | cpio -id</p></blockquote>
<p>Cross your fingers;<br />
<code>telinit 6</code>;<br />
It just worked for me:  </p>
<blockquote><p># uname -a<br />
Linux &#8230; 2.6.26-2-amd64 #1 SMP &#8230; x86_64 GNU/Linux</p></blockquote>
<p>Still got no ping? Login to console and <code>rmmod bnx2 &#038;&#038; modprobe bnx2</code> <img src='http://ejs.seniejitrakai.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2009/07/06/bnx2-cant-load-firmware-file-bnx2-06-405fw/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

