<?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>Il non-blog di Mario Pascucci &#187; &#8230;english, too!</title>
	<atom:link href="http://www.ismprofessional.net/pascucci/index.php/category/english-too/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ismprofessional.net/pascucci</link>
	<description>Sto lavorando sodo per preparare il mio prossimo errore (B. Brecht)</description>
	<lastBuildDate>Wed, 04 Jan 2012 11:50:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Autotest: v1.11 with english translation, too</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2008/08/wordpress-autotest-v111-with-english-translation-too/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2008/08/wordpress-autotest-v111-with-english-translation-too/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 14:01:49 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Information security]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[intrusion detection]]></category>
		<category><![CDATA[Owned Wordpress]]></category>
		<category><![CDATA[sicurezza dell'informazione]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=286</guid>
		<description><![CDATA[If you suspect an intrusion in your WordPress blog, or spam link injection, or you feel that your blog is 0wned, you can do this check. Instructions and results are in English language. Some documentation about WordPress spam injection and redirection is here.]]></description>
			<content:encoded><![CDATA[<p>If you suspect an intrusion in your WordPress blog, or spam link injection, or you feel that your blog is 0wned, you can do <a href="http://www.ismprofessional.net/pascucci/wp-test.php">this check</a>. </p>
<p>Instructions and results are in English language. Some documentation about <a href="http://www.ismprofessional.net/pascucci/index.php/2008/04/wordpress-blog-compromised/">WordPress spam injection and redirection is here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2008/08/wordpress-autotest-v111-with-english-translation-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attention: your WordPress blog may be compromised.</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2008/04/wordpress-blog-compromised/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2008/04/wordpress-blog-compromised/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 11:16:23 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Information security]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[website intrusion]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/index.php/2008/04/attention-your-wordpress-blog-may-be-compromised/</guid>
		<description><![CDATA[Post updated after publish, see bottom If you came to this article because you got an e-mail or a comment in your blog that ask to read it, please do not go away. Read the rest. I&#8217;m an independent Information Security researcher. I&#8217;m investigating about an attack to some WordPress based blogs that involves spam [...]]]></description>
			<content:encoded><![CDATA[<h4>Post updated after publish, see bottom</h4>
<p>If you came to this article because you got an e-mail or a comment in your blog that ask to read it, please do not go away. Read the rest. </p>
<p>I&#8217;m an independent Information Security researcher. I&#8217;m investigating about an attack to some WordPress based blogs that involves spam and exploiting Google pagerank mechanism. </p>
<p>First of all, check yourself that your blog may be compromised. To do that, you need to do two different checks. First requires a little utility called &#8220;wget&#8221;, that is widely used in Linux, but it is available for Windows, too. Use this command:</p>
<pre><code>
wget -U googlebot -O home.html http://yourblogurl/

</code></pre>
<p>Note that <tt>-O</tt> and <tt>-U</tt> are both capital, and <tt>http://yourblogurl/</tt> is the address of your blog homepage.<br />
After command execution you will get a single file called <tt>home.html</tt>, that contains the HTML of your blog homepage. This is how your blog appears to the Google spider. Open it with a text editor, <strong>not from web browser</strong>. Examine the code, and you can see a block of code in a &lt;div&gt; block, that contains links that don&#8217;t belongs to your site. Usually it is shortly after the opening &lt;body&gt; tag, or near the end of page.<br />
These links are about pills, ring tones, loan, and so on, like normal spam mails. You can compare with your homepage as appears on your browser source viewer, or you can get another copy with wget, without the <tt>-U</tt> option, so you get the &#8220;regular&#8221; homepage. </p>
<p>For the second check, open your browser and go to Google search. Type this query string:<br />
<code>buy valium inurl:yourblogurl</code><br />
where <strong>yourblogurl</strong> is a part of the site name that is unique for your blog. I.e. if I want to check my blog I will type:<br />
<code>buy valium inurl:ismprofessional</code><br />
Change text according to your website, and try other well-known drugs name, like the &#8220;blue pills&#8221;, named in every mail spam message. </p>
<p>The result of the query can be something like this:</p>
<pre><code>
Buy Valium from Sunrise Movies
All the information and advice you'll need to find the best
Buy Valium with the lowest Vicodin price, even if you're a first-time buyer.
www.yourblogurl/?item=137

</code></pre>
<p>The query part of the url string can change. This is an incomplete list:</p>
<pre><code>
?google-approved=number
?coupon_number=number
?item=number
?order_id=number
?certified=number
?pharma-certified=number

</code></pre>
<p>If you click on the link in the search results, apparently nothing special happens: you will go in your blog. </p>
<p>But try this: open cookie management of your browser, search for all cookies of your site and delete them. Then return to Google result page and click again on the link with your blog. This time something different happens: your browser will redirected to an online pharmacy. </p>
<p>How this is possible? I don&#8217;t know exactly, but I can do some hypotheses: If someone was able to crack something in your WordPress installation, the <tt>index.php</tt> file may contain malicious code that checks if you visited the blog in the past, through the cookie. If you have the cookie, the code do not activate itself, so you see your blog. If you do not visited blog before, and you come from a search engine, the malicious code redirect your browser to pharmacy site. </p>
<p>It is a sort of hiding mechanism to protect malicious code being discovered by regular blog visitor, or by blog owner. </p>
<p>If you do not understand terms I used, please ask to someone more skilled to explain in other words. </p>
<p>I wrote this message because I tried to warn blog owners of the problem, but my message got no replies, and I suspect that gets catch by spam filters. It is quite difficult to write about drugs spam without use same terms used by spammers. </p>
<p>If you get persuaded that my warning is true, please DO NOT delete your WordPress installation files on server. Save them on a zip file and, if you can, send the zipfile to me, so I can figure how malicious code was injected in your blog. After that you can delete all the file and reinstall WordPress. Check also the database, because some malicious code put extraneous data in WordPress tables. </p>
<p>For what I see, upgrading to WordPress 2.5 DO NOT solve the problem. Some of the hacked blogs already use version 2.5, but the problem persist. </p>
<p>Why I do all this work? Because I think that someone exploiting a bug or a flaw in WordPress, or in the web server configuration, to do dirty business. These people knows <em>perfectly</em> how Google Pagerank works, and are able to use it very well. </p>
<p>I earn nothing from that. I do only for ethical reason. </p>
<p>So, if you think that I am in error, please apologize, and you can forget any message I send to you. </p>
<p>In other case, you can contact me using <a href="http://www.ismprofessional.net/pascucci/index.php/per-contattarmi/">this page</a>. </p>
<p>At the moment I get more information, I will update this post, so stay tuned. </p>
<h4>First information available</h4>
<p>Thanks to Jay, we have first data about malicious code. There are some symptoms:</p>
<ul>
<li>An extraneous file uploaded to the /tmp/ directory on the server, added as a WP add-on. <strong>Warning</strong>: It didn&#8217;t show up on the list, so it was only visible by looking at the actual database using phpMyAdmin.</li>
<li>New admin account in WordPress as well, called &#8220;WordPress&#8221;. <strong>Warning</strong>: invisible in the administration interface of WordPress.</li>
<li>Other PHP scripts placed around in various directory of server. Jay do not send me a sample, but he looked into the code, and these scripts allow remote shell and command execution.</li>
</ul>
<p>Note that: WordPress was updated to last release, but the redirect code were still in place and active. Only after direct database editing the redirect stops working.</p>
<h4>A different cracking scheme</h4>
<p>During the analysis of a different blog, I found another type of penetration scheme:</p>
<ul>
<li>The cracker targets old WordPress releases, known to be highly vulnerable, i.e. 2.0.3, 2.0.5 and so on.</li>
<li>It inject one or two files in unused directories, like <tt>wp-content/themes/classic</tt>, or in uploads directory.</li>
<li>These files are: a remote shell coded in PHP, and the &#8220;spam injector/redirector&#8221;.</li>
<li>It uses something called &#8220;doorgen&#8221;, but the name can be other</li>
</ul>
<p>So, checks your WordPress installation for modified or extraneous files.</p>
<h3>Update</h3>
<p>I arranged an automated test to check for this problem. The page is called <a href="http://www.ismprofessional.net/pascucci/wp-test.php">WordPress Autotest</a>. Read instructions carefully. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2008/04/wordpress-blog-compromised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mybook: problem with Samba</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2008/01/mybook-problem-with-samba/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2008/01/mybook-problem-with-samba/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 11:19:19 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/index.php/2008/01/mybook-problem-with-samba/</guid>
		<description><![CDATA[If you install Samba on Mybook from Debian &#8220;lenny&#8221; repo, you probably face to the following problem: $ smbclient -L //localhost/ Domain=[NAS] OS=[Unix] Server=[Samba 3.0.26a] Sharename Type Comment --------- ---- ------- TTTTTTTTTTTT Disk llllll Disk IIIII IPC IIIIIIIIIIIIIIIIIIIIIIIII Domain=[NAS] OS=[Unix] Server=[Samba 3.0.26a] Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP that is every &#8220;share&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>If you install Samba on Mybook from Debian &#8220;lenny&#8221; repo, you probably face to the following problem:</p>
<pre>$ <strong>smbclient -L //localhost/</strong>
Domain=[NAS] OS=[Unix] Server=[Samba 3.0.26a]

        Sharename       Type      Comment
        <code>---------       ----      -------</code>
        TTTTTTTTTTTT    Disk
        llllll          Disk
        IIIII           IPC       IIIIIIIIIIIIIIIIIIIIIIIII
Domain=[NAS] OS=[Unix] Server=[Samba 3.0.26a]

        Server               Comment
        <code>---------            -------</code>

        Workgroup            Master
        <code>---------            -------</code>
        WORKGROUP
</pre>
<p>that is every &#8220;share&#8221; appears with first letter of share name, repeated length+1 chars of the name length.</p>
<p>This is caused by a bug of gcc compiler for ARM, that fails code generation if you use any level of optimization. This bug affect Samba up to release 3.0.28-1, and will be corrected in the 3.0.28-2 release of the Debian package.</p>
<p>References:</p>
<ul>
<li>Debian <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445566">bug report #445566</a></li>
<li><a href="http://honza-stastny-en.blogspot.com/2008/01/wd-my-book-debian-lenny-samba.html">Honza Stastny website</a>, that talk about this bug, and the battle to bring Samba to life on his Mybook</li>
</ul>
<h4>Note</h4>
<p>The disk I installed on my Mybook (the one I use to made <a href="http://www.ismprofessional.net/pascucci/index.php/category/linux/linux-sul-western-digital-mybook-world-edition/">all the tests</a>) fails, without warning, after less than five months. Having smartd installed not helped at all&#8230;<br />
So I&#8217;m currently unable to do more tests, or give any help.<br />
I&#8217;m sorry. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2008/01/mybook-problem-with-samba/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mybook: why disk image backup fails?</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/12/mybook-why-disk-image-backup-fails/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/12/mybook-why-disk-image-backup-fails/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 10:34:34 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/index.php/2007/12/mybook-why-disk-image-backup-fails/</guid>
		<description><![CDATA[I read about making a backup of a Western Digital Mybook World edition, and how some of this backups fails at the moment of restore. The main reason is those backups are made with partition imaging software (like Partition Magic or Partimage), and some guide includes instruction to save partition table and MBR, too. Right, [...]]]></description>
			<content:encoded><![CDATA[<p>I read about making a backup of a Western Digital Mybook World edition, and how some of this backups fails at the moment of restore.</p>
<p>The main reason is those backups are made with partition imaging software (like Partition Magic or Partimage), and some guide includes instruction to save partition table and MBR, too. Right, but there are more data on disk that needs to be saved, and that cannot be recovered in any other way that do a raw image of a number of sector at the start of the disk.</p>
<h4>Mybook disk configuration</h4>
<p><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/mybook-disk.png' alt='Mybook disk configuration' /></p>
<p>In picture you can see schematic of the typical WD Mybook WE disk. At the start (in absolute sector 0) there are MBR and partition table (in blue). The partition table point to partitions, stored after some hundred of sector away (in yellow). The original partition table of Mybook place the first partition start on cylinder 4, that is over 48,000 sectors far away from MBR. </p>
<p>Why?</p>
<p>Because in that space there is some software that is <strong>vital</strong> for Mybook startup process: the bootloaders (in red in figure)!</p>
<p>So, if you want a really complete and working backup, you must save all this sectors in a raw file, using Linux command <strong>dd</strong>. </p>
<p>A rough procedure can be: use sfdisk to get the exact sector of start of partition sda1:</p>
<pre><strong># sfdisk -d /dev/sda</strong>
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=    48195, size=  5879790, Id=fd
/dev/sda2 : start=  5927985, size=   208845, Id=fd
/dev/sda3 : start=  6136830, size=  1975995, Id=fd
</pre>
<p>In this example sda1 starts at sector 48195. Well, when we save the MBR we use the command:</p>
<pre><strong># dd if=/dev/sda of=sda-mbr bs=512 count=1</strong></pre>
<p>But this save only first sector. We need to save all the sector up to start of sda1 partition, so the command must be:</p>
<pre><strong># dd if=/dev/sda of=sda-mbr bs=512 count=48195</strong></pre>
<p><strong>Of course, change the number 48195 to match your disk configuration.</strong><br />
So, now we have the content of the entire space from MBR to start of sda1 partition, with all the bootloaders included.</p>
<p>Now the backup is really complete.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/12/mybook-why-disk-image-backup-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mybook: peer2peer with mldonkey</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-peer2peer-with-mldonkey/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-peer2peer-with-mldonkey/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 07:00:30 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=108</guid>
		<description><![CDATA[Con mldonkey installato nel Mybook resuscitato abbiamo un client peer to peer gestibile via web. Può connettersi alle reti: emule/edonkey e bittorrent. (Articolo solo in inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano) Using mldonkey on the Revived Mybook we have a complete peer to peer client with web [...]]]></description>
			<content:encoded><![CDATA[<p>Con <a href="http://mldonkey.sourceforge.net/Main_Page">mldonkey</a> installato nel Mybook resuscitato abbiamo un client peer to peer gestibile via web. Può connettersi alle reti: emule/edonkey e bittorrent.<br />
(Articolo solo in inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano)</p>
<p>Using <a href="http://mldonkey.sourceforge.net/Main_Page">mldonkey</a> on the Revived Mybook we have a complete peer to peer client with web interface. It uses edonkey/emule and bittorrent protocols/networks.</p>
<p><span id="more-108"></span></p>
<p>As usual, first step is installing mldonkey:</p>
<pre><code># apt-get install mldonkey-server
. . .
</code></pre>
<p>During installation, apt asks for automatically launch mldonkey on system startup. We can reply affirmatively.<br />
As the installation end, we have mldonkey up and running, but we have two problems:</p>
<ul>
<li>mldonkey places all working and temp files in /var/lib/mldonkey. If we use a partitioning scheme with root filesystem and home filesystem this lead to fill root partition and cause malfunctions on Mybook.</li>
<li>mldonkey web interface is accessible only from 127.0.0.1, that is useless.</li>
</ul>
<p>So, we stop mldonkey server:</p>
<pre><code># /etc/init.d/mldonkey-server stop</code></pre>
<p>then move the working directory in the /home partition:</p>
<pre><code># mv /var/lib/mldonkey /home</code></pre>
<p>and set the new working dir in file /etc/default/mldonkey-server that is:</p>
<pre><code># MLDonkey configuration file
# This file is loaded by /etc/init.d/mldonkey-server.
# This file is managed using ucf(1).

MLDONKEY_DIR=/var/lib/mldonkey
MLDONKEY_USER=mldonkey
MLDONKEY_GROUP=mldonkey
MLDONKEY_UMASK=0022
LAUNCH_AT_STARTUP=true
MLDONKEY_NICENESS=0
</code></pre>
<p>in that way:</p>
<pre><code># MLDonkey configuration file
# This file is loaded by /etc/init.d/mldonkey-server.
# This file is managed using ucf(1).

MLDONKEY_DIR=<strong>/home/mldonkey</strong>
MLDONKEY_USER=mldonkey
MLDONKEY_GROUP=mldonkey
MLDONKEY_UMASK=0022
LAUNCH_AT_STARTUP=true
MLDONKEY_NICENESS=0
</code></pre>
<p>Next, we open file /home/mldonkey/downloads.ini, and we locate the line with:</p>
<pre><code> allowed_ips = [
  "127.0.0.1";]</code></pre>
<p>This is the list of IP address enabled to access mldonkey web interface. We can modify it as explained <a href="http://mldonkey.sourceforge.net/Allowed_ips">here</a>. I.e. to enable access from all PC in the network 192.168.1.x we can change in:</p>
<pre><code> allowed_ips = [ <strong>"192.168.1.0/24";</strong>
  "127.0.0.1";]</code></pre>
<p>Make sure that mldonkey is stopped when modify this file: in the shutdown mldonkey writes down current configuration and overwrites all our changes.<br />
Next we can start again mldonkey, and point our browser to: http://mybook-ip-address:4080/.<br />
Note that mldonkey requires about a minute to start, and is a memory eater, so there will be some problems if your Mybook is loaded with Samba and CUPS.<br />
That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-peer2peer-with-mldonkey/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Mybook: Samba</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-samba/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-samba/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 07:00:39 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=107</guid>
		<description><![CDATA[Come attivare la condivisione file Windows&#8482; compatibile nel Mybook risuscitato. (Questo articolo è solo in inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano.) How to add Windows&#8482; compatible file sharing in the Revived Mybook. Before installing Samba, it is suitable to install CUPS, too. To install Samba and the [...]]]></description>
			<content:encoded><![CDATA[<p>Come attivare la condivisione file Windows&trade; compatibile nel Mybook risuscitato.<br />
(Questo articolo è solo in inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano.)</p>
<p>How to add Windows&trade; compatible file sharing in the Revived Mybook.</p>
<p><span id="more-107"></span></p>
<p>Before installing Samba, it is suitable to install <a href="http://www.ismprofessional.net/pascucci/?p=106">CUPS</a>, too.<br />
To install Samba and the web administration tool, SWAT, we use this command:</p>
<pre><code>root@mybook:~# apt-get install swat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  openbsd-inetd samba samba-common samba-doc tcpd update-inetd
Suggested packages:
  samba-doc-pdf
Recommended packages:
  smbldap-tools
The following NEW packages will be installed:
  openbsd-inetd samba samba-common samba-doc swat tcpd update-inetd
0 upgraded, 7 newly installed, 0 to remove and 19 not upgraded.
Need to get 14.4MB of archives.
After unpacking 32.3MB of additional disk space will be used.
. . .
</code></pre>
<p>During the installation, installer ask for:</p>
<ul>
<li>Workgroup/Domain</li>
<li>If you want to use WINS coming from DHCP</li>
</ul>
<p>As the installation ends, you have Samba ready to work. If you haven&#8217;t SWAT running, use this command:</p>
<pre><code>dpkg-reconfigure openbsd-inetd</code></pre>
<p>that reads /etc/inetd.conf file and set inetd to automatically start at system boot.</p>
<p>Now you can start managing shares and users, pointing your browser to: http://ip-of-your-mybook:901/. You asked for login/password (that is root/root password).<br />
Remember that Samba requires that Unix user <em>must exist</em> before you can add it to Samba users.<br />
To create Unix user you can use:</p>
<pre><code># useradd -m username</code></pre>
<p>that adds user &#8220;username&#8221; to Unix users and create (with -m switch) the home directory.<br />
In this case you can assign users to private directories, and every user can manage his files, accessing with Samba password.<br />
You can refer to immense documentation in the <a href="http://www.samba.org/">Samba</a> website. </p>
<p>That&#8217;s all. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/09/mybook-samba/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mybook: cups print server</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-cups-print-server/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-cups-print-server/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 07:00:35 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=106</guid>
		<description><![CDATA[Come trasformare il Mybook resuscitato in un print server per stampanti USB o di rete. (Questo articolo è solo in inglese. Se qualcuno ha interesse me lo faccia sapere che lo traduco in italiano.) How to enable the Revived Mybook as a print server for USB or network printers. First of all, we install CUPS [...]]]></description>
			<content:encoded><![CDATA[<p>Come trasformare il Mybook resuscitato in un print server per stampanti USB o di rete.<br />
(Questo articolo è solo in inglese. Se qualcuno ha interesse me lo faccia sapere che lo traduco in italiano.)</p>
<p>How to enable the Revived Mybook as a print server for USB or network printers.</p>
<p><span id="more-106"></span></p>
<p>First of all, we install CUPS print server:</p>
<pre><code>root@mybook:~# apt-get install cupsys
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cupsys-common defoma file fontconfig-config gs-common gs-esp gsfonts
  libcairo2 libcupsimage2 libcupsys2 libdbus-1-3 libexpat1 libfontconfig1
. . .
. . .
Need to get 24.9MB of archives.
After unpacking 76.0MB of additional disk space will be used.
Do you want to continue [Y/n]? <strong>y</strong>
</code></pre>
<p>as you can see this will install a lot of packages&#8230; so please be patient.<br />
As the installation ends, open the file /etc/cups/cupsd.conf and locate the line with:</p>
<pre><code>Listen localhost:631</code></pre>
<p>change in:</p>
<pre><code>Listen *:631</code></pre>
<p>and restart CUPS:</p>
<pre><code># /etc/init.d/cupsys restart</code></pre>
<p>This will enable CUPS to listen on external interface eth0.<br />
Locate the line with:</p>
<pre><code>DefaultAuthType Basic</code></pre>
<p>and add immediately after this line:</p>
<pre><code>DefaultEncryption Never</code></pre>
<p>Locate the section:</p>
<pre><code>&lt;Location /&gt;
  Order allow,deny
  Allow localhost
  Allow @LOCAL
&lt;/Location&gt;</code></pre>
<p>and change in:</p>
<pre><code>&lt;Location /&gt;
  Order allow,deny
  Allow localhost
  <strong>Allow all</strong>
&lt;/Location&gt;</code></pre>
<p>This will allow access to any computer in the network.<br />
You can also use:</p>
<pre><code>Allow 192.168.x.y/255.255.255.0
Allow @LOCAL
Allow *.mydomain</code></pre>
<p>Refer to CUPS documentation included in CUPS administration web pages.<br />
Locate the section:</p>
<pre><code>&lt;Location /admin&gt;
  Order allow,deny
  Allow localhost
&lt;/Location&gt;</code></pre>
<p>and change in:</p>
<pre><code>&lt;Location /admin&gt;
  <strong>AuthType Basic
  Require user @SYSTEM</strong>
  Order allow,deny
  Allow localhost
  <strong>Allow all</strong>
&lt;/Location&gt;</code></pre>
<p>This will allow access to remote administration, but requires user/password (i.e. user root and the same password of the root user in the Mybook)<br />
The same you must do in:</p>
<pre><code>&lt;Location /admin/conf&gt;
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
  <strong>Allow all</strong>
&lt;/Location&gt;</code></pre>
<p>Restart cupsys:</p>
<pre><code># /etc/init.d/cupsys restart</code></pre>
<p>Now you can add printers.<br />
For best use, I advise to use only &#8220;raw&#8221; printers in Mybook CUPS server, and use the driver of the printing computer, this is the best situation.<br />
If you have HP Jetdirect network printer, when adding printer, in the Device you must choose &#8220;AppSocket/HP JetDirect&#8221;, and in URI you must insert the string:</p>
<pre><code>socket://hostname:9100</code></pre>
<p>where &#8220;hostname&#8221; is the IP address of the printer, or the name if resolved from your DNS.<br />
If you have USB printer first connect the printer to the Mybook, next go in &#8220;Add printer&#8221; from the administration web. In the Device page you should see your printer listed in the combo box. In some cases CUPS doesn&#8217;t allow you to define printer as &#8220;raw&#8221; in this step, but if you select any driver and install the printer, next you can go in Printers and change the configuration of the printer to &#8220;raw&#8221;.<br />
That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-cups-print-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mybook: how to use &#8220;fuel gauge&#8221; leds</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-how-to-use-fuel-gauge-leds/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-how-to-use-fuel-gauge-leds/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 12:41:10 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=109</guid>
		<description><![CDATA[Western Digital Mybook Workd Edition has ten leds on the front side. This article talk about using it. (Articolo solo in lingua inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano.) Leds are placed in two &#8220;rings&#8221;, outer and inner. Outer ring use four leds, and kernel uses it to [...]]]></description>
			<content:encoded><![CDATA[<p>Western Digital Mybook Workd Edition has ten leds on the front side. This article talk about using it.<br />
(Articolo solo in lingua inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano.)</p>
<p><span id="more-109"></span></p>
<p>Leds are placed in two &#8220;rings&#8221;, outer and inner. Outer ring use four leds, and kernel uses it to shows general activity, with effect like a rotating lamp (clockwise), and can be used to notify some special conditions. Inner ring uses six leds, and can be used as a &#8220;fuel gauge&#8221;. I.e. it can be lit progressively like an empty/full indicator.<br />
To lit it, we use a special file in <code>/sys</code> directory, available only when kernel module <code>wdc-leds</code> is loaded (should be loaded at system boot if you use my <a href="http://www.ismprofessional.net/pascucci/?page_id=96">root filesystem</a>).<br />
File is: <code>/sys/devices/platform/wdc-leds/leds:wdc-leds:fuel-gauge/brightness</code> and accept a value from 0 to 255. To write a value in it we use the command:</p>
<pre><code># echo 50 > "/sys/devices/platform/wdc-leds/leds:wdc-leds:fuel-gauge/brightness"</code></pre>
<p>This will lit three leds of the inner ring (at 5, 7 and 9 o&#8217;clock).<br />
Equivalence between value and leds is:</p>
<ul>
<li>value from 0 to 32: lits one led (5 o&#8217;clock)</li>
<li>value from 33 to 49: lits two leds (5 and 7 o&#8217;clock)</li>
<li>value from 50 to 66: lits three leds (5, 7 and 9 o&#8217;clock)</li>
<li>value from 67 to 82: lits four leds (5, 7, 9 and 11 o&#8217;clock)</li>
<li>value from 83 to 96: lits five leds (5, 7, 9, 11 and 1 o&#8217;clock)</li>
<li>value from 97 and upper: lits all leds.</li>
</ul>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/fuel-gauge.png' title='Mybook gauge leds'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/fuel-gauge.miniatura.png' alt='Mybook gauge leds' /></a><br />
In this picture you can see how leds are lit.</p>
<p>There is no value to put off all leds, even with 0 the first led lits (only unloading module).<br />
Known that is really simple to arrange a &#8220;space meter&#8221; using leds, or a visual progress bar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-how-to-use-fuel-gauge-leds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mybook: l&#8217;album delle foto</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-lalbum-delle-foto/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-lalbum-delle-foto/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 13:28:35 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=99</guid>
		<description><![CDATA[Una raccolta di foto del Mybook, durante le varie fasi delle operazioni descritte qui. A photo gallery of Mybook, during operations described here. Il connettore usato per la console seriale. Serial console connector. Lo stesso connettore visto dall&#8217;esterno. Same connector, external view. Altra vista dall&#8217;esterno. Another external view. La posizione del connettore sullo stampato del [...]]]></description>
			<content:encoded><![CDATA[<p>Una raccolta di foto del Mybook, durante le varie fasi delle operazioni descritte <a href="http://www.ismprofessional.net/pascucci/?p=94">qui</a>.</p>
<p>A photo gallery of Mybook, during operations described <a href="http://www.ismprofessional.net/pascucci/?p=94">here</a>.</p>
<p><span id="more-99"></span></p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-01.jpg' title='La seriale'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-01.miniatura.jpg' alt='La seriale' /></a><br />
Il connettore usato per la console seriale.<br />
Serial console connector.</p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-02.jpg' title='La seriale'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-02.miniatura.jpg' alt='La seriale' /></a><br />
Lo stesso connettore visto dall&#8217;esterno.<br />
Same connector, external view.</p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-03.jpg' title='La seriale'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-03.miniatura.jpg' alt='La seriale' /></a><br />
Altra vista dall&#8217;esterno.<br />
Another external view.</p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-04.jpg' title='Il circuito stampato'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-conn-04.miniatura.jpg' alt='Il circuito stampato' /></a><br />
La posizione del connettore sullo stampato del Mybook.<br />
Serial connector position in Mybook PCB.</p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-assembled-01.jpg' title='Il Mybook con la seriale'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-assembled-01.miniatura.jpg' alt='Il Mybook con la seriale' /></a><br />
Il Mybook riassemblato con il connettore della console seriale in alto a sinistra.<br />
Reassembled Mybook, with serial connector on the upper left.</p>
<p><a href='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-assembled-02.jpg' title='Dettaglio del connettore'><img src='http://www.ismprofessional.net/pascucci/wp-content/uploads/serial-assembled-02.miniatura.jpg' alt='Dettaglio del connettore' /></a><br />
Un dettaglio del connettore dopo il riassemblaggio del Mybook.<br />
Connector detail after assembling Mybook.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-lalbum-delle-foto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MyBook: syslog</title>
		<link>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-syslog/</link>
		<comments>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-syslog/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 13:48:41 +0000</pubDate>
		<dc:creator>Mario Pascucci</dc:creator>
				<category><![CDATA[...english, too!]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mybook]]></category>

		<guid isPermaLink="false">http://www.ismprofessional.net/pascucci/?p=97</guid>
		<description><![CDATA[Ora attiviamo i log di sistema per il Mybook. (Nota: se abbiamo installato una immagine del root filesystem versione 20070826 o successiva occorre solo installare il logrotate, i demoni syslog e klog sono già installati) Now we install log daemons for Mybook. (Note: if you install a root filesystem image release 20070826 or newer, you [...]]]></description>
			<content:encoded><![CDATA[<p>Ora attiviamo i log di sistema per il Mybook.<br />
(<strong>Nota: se abbiamo installato una immagine del root filesystem versione 20070826 o successiva occorre solo installare il logrotate, i demoni syslog e klog sono già installati</strong>)</p>
<p>Now we install log daemons for Mybook.<br />
(<strong>Note: if you install a root filesystem image release 20070826 or newer, you need only logrotate, syslog and klog daemons are already installed and operative</strong>)</p>
<p><span id="more-97"></span></p>
<p>Come primo servizio, dato che l&#8217;immagine del filesystem è realmente ridotta, ci occorre il log di sistema e del kernel, dato che saranno i primi posti dove andremo a guardare in presenza di problemi. Il primo passo è l&#8217;installazione dei demoni di log:</p>
<pre><code>root@mybook:~# apt-get install sysklogd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  klogd
The following NEW packages will be installed:
  klogd sysklogd
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 104kB of archives.
After unpacking 194kB of additional disk space will be used.
Do you want to continue [Y/n]? <strong>y</strong>
...
Setting up klogd (1.5-1) ...
Starting kernel log daemon....

Setting up sysklogd (1.5-1) ...
Starting system log daemon....
</code></pre>
<p>Poi installiamo anche il pacchetto <strong>logrotate</strong>, che impedisce ai file di log di diventare troppo grandi, creandone di nuovi ed archiviando i vecchi periodicamente:</p>
<pre><code>root@mybook:~# apt-get install logrotate
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
  mailx
The following NEW packages will be installed:
  logrotate
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
...
Setting up logrotate (3.7.1-3) ...

</code></pre>
<p>E&#8217; tutto. I file di log saranno nella directory /var/log e periodicamente verranno ruotati e cancellati i più vecchi.</p>
<p>As first service, we need system and kernel logs, the first places where to look when in troubles, so we going to install log daemons:</p>
<pre><code>root@mybook:~# apt-get install sysklogd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  klogd
The following NEW packages will be installed:
  klogd sysklogd
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 104kB of archives.
After unpacking 194kB of additional disk space will be used.
Do you want to continue [Y/n]? <strong>y</strong>
...
Setting up klogd (1.5-1) ...
Starting kernel log daemon....

Setting up sysklogd (1.5-1) ...
Starting system log daemon....
</code></pre>
<p>Next, we install the <strong>logrotate</strong> package, to avoid excessive grow of log files:</p>
<pre><code>root@mybook:~# apt-get install logrotate
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
  mailx
The following NEW packages will be installed:
  logrotate
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
...
Setting up logrotate (3.7.1-3) ...
</code></pre>
<p>That&#8217;s all. Log files are in the /var/log directory, and will be rotated periodically, deleting oldest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ismprofessional.net/pascucci/index.php/2007/08/mybook-syslog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

