<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>technikhaufen - debian</title>
    <link>http://gebi.supersized.org/</link>
    <description>many to many</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3-alpha1 - http://www.s9y.org/</generator>
    <pubDate>Sun, 15 Jun 2008 22:10:12 GMT</pubDate>

    <image>
        <url>http://gebi.supersized.org/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: technikhaufen - debian - many to many</title>
        <link>http://gebi.supersized.org/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>dd can not count</title>
    <link>http://gebi.supersized.org/archives/7-dd-can-not-count.html</link>
            <category>Computer</category>
            <category>debian</category>
            <category>Linux</category>
    
    <comments>http://gebi.supersized.org/archives/7-dd-can-not-count.html#comments</comments>
    <wfw:comment>http://gebi.supersized.org/wfwcomment.php?cid=7</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://gebi.supersized.org/rss.php?version=2.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    

    <author>nospam@example.com (Michael Gebetsroither)</author>
    <content:encoded>
    &lt;h4 id=&quot;how-much-is-51kb&quot;
&gt;How much is 5*1kB?&lt;/h4
&gt;&lt;p
&gt;128Byte as of dd.&lt;/p
&gt;&lt;p
&gt;% strace -e read,open dd if=/dev/random of=foo bs=1k count=5&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;open(&amp;quot;/dev/random&amp;quot;, O_RDONLY|O_LARGEFILE) = 0
read(0, &amp;quot;\347P\203\355\206O;\362f\263v{s\327\206\354\302{\21\5\203&amp;quot;..., 1024) = 96
read(0, &amp;quot;U\16ee\330\304\264@&amp;quot;, 1024)    = 8
read(0, &amp;quot;\316\26\363\\\26j\377\10&amp;quot;, 1024) = 8
read(0, &amp;quot;K\331.\273,\200\4\234&amp;quot;, 1024)  = 8 
read(0, &amp;quot;\2312\323/\304\376\n\261&amp;quot;, 1024) = 8
0+5 records in
0+5 records out
128 bytes (128 B) copied, 2.85809 seconds, 0.0 kB/s
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;Seems 128bytes are quite less than the requested 5kB.&lt;/p
&gt;&lt;p
&gt;% man 2 read&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;RETURN VALUE
On success, the number of bytes read is returned (zero indicates end of
file), and the file position is advanced  by this  number. It is not an
error if this number is smaller than the number  of  bytes  requested; ...
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;dd_rescue-to-the-rescue&quot;
&gt;dd_rescue to the rescue&lt;/h4
&gt;&lt;p
&gt;% dd_rescue -m 1k /dev/random foo&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;Summary for /dev/random -&amp;gt; foo:
dd_rescue: (info): ipos:         1.0k, opos:         1.0k, xferd:         1.0k
                   errs:      0, errxfer:         0.0k, succxfer:         1.0k
             +curr.rate:        0kB/s, avg.rate:        0kB/s, avg.load:  0.0%
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;% ls -la foo&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;-rw-r----- 1 einstein einstein 1024 2008-06-15 18:35 foo
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;At lest dd_rescue is able to count correct.&lt;/p
&gt;
 
    </content:encoded>

    <pubDate>Sun, 15 Jun 2008 18:36:43 +0200</pubDate>
    <guid isPermaLink="false">http://gebi.supersized.org/archives/7-guid.html</guid>
    
</item>
<item>
    <title>Installing chrooted scponly on debian64</title>
    <link>http://gebi.supersized.org/archives/5-Installing-chrooted-scponly-on-debian64.html</link>
            <category>debian</category>
    
    <comments>http://gebi.supersized.org/archives/5-Installing-chrooted-scponly-on-debian64.html#comments</comments>
    <wfw:comment>http://gebi.supersized.org/wfwcomment.php?cid=5</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://gebi.supersized.org/rss.php?version=2.0&amp;type=comments&amp;cid=5</wfw:commentRss>
    

    <author>nospam@example.com (Michael Gebetsroither)</author>
    <content:encoded>
    &lt;h4 id=&quot;install&quot;
&gt;Install&lt;/h4
&gt;&lt;pre
&gt;&lt;code
  &gt;apt-get update
apt-get install scponly
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;configure&quot;
&gt;Configure&lt;/h4
&gt;&lt;p
&gt;Reconfigure scponly to do chrooting.&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;dpkg-reconfigure scponly
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;setup-chroot&quot;
&gt;Setup chroot&lt;/h4
&gt;&lt;p
&gt;Debian has a script to help you with this task, but it&#039;s not without problems.&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;cd /usr/share/doc/scponly/setup_chroot
gunzip setup_chroot.sh.gz
sh setup_chroot.sh
&amp;gt; maybe use in/ instead of incoming/ ;)
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;fixing-chroot-made-by-the-script&quot;
&gt;Fixing chroot made by the script&lt;/h4
&gt;&lt;p
&gt;And there are the problems:&lt;/p
&gt;&lt;ol class=&quot;decimal&quot;
&gt;&lt;li
  &gt;The chroot is &lt;em
    &gt;not&lt;/em
    &gt; working&lt;/li
  &gt;&lt;li
  &gt;Chroot is not updated as setup_chroot.sh just use cp&lt;/li
  &gt;&lt;/ol
&gt;&lt;p
&gt;The first is not that hard to fix:&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;cp /lib64/ld-linux-x86-64.so.2 /home/scponly/lib
ln -s lib /home/scponly/lib64
mkdir /home/scponly/dev
cp -a /dev/null /home/scponly/dev
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;fix-for-winscp-and-some-other-clients&quot;
&gt;Fix for Winscp and some other clients&lt;/h4
&gt;&lt;p
&gt;Compile this small programm to groups and copy it to /home/scponly/bin.&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;#include &amp;lt;string.h&amp;gt;
main()
{
        const char out[] = &amp;quot;root users\n&amp;quot;;
        write(1, out, strlen(out));
        return 0;
}

diet gcc -O2 -s groups.c -o groups
cp groups /home/scponly/bin
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;done&quot;
&gt;Done&lt;/h4
&gt;&lt;p
&gt;There is now a fully working chrooted scponly environment. &lt;br /&gt;To upload something:&lt;/p
&gt;&lt;pre
&gt;&lt;code
  &gt;scp &amp;lt;FILE&amp;gt; scponly@&amp;lt;HOST&amp;gt;:in/
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;In my next post i&#039;ll descibe a possible solution for a chroot setup without any hassels and need to keep it in sync with the host-system.&lt;/p
&gt;
 
    </content:encoded>

    <pubDate>Thu, 01 May 2008 22:41:20 +0200</pubDate>
    <guid isPermaLink="false">http://gebi.supersized.org/archives/5-guid.html</guid>
    
</item>
<item>
    <title>Installing gitosis on debian</title>
    <link>http://gebi.supersized.org/archives/4-Installing-gitosis-on-debian.html</link>
            <category>debian</category>
            <category>vcs</category>
    
    <comments>http://gebi.supersized.org/archives/4-Installing-gitosis-on-debian.html#comments</comments>
    <wfw:comment>http://gebi.supersized.org/wfwcomment.php?cid=4</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://gebi.supersized.org/rss.php?version=2.0&amp;type=comments&amp;cid=4</wfw:commentRss>
    

    <author>nospam@example.com (Michael Gebetsroither)</author>
    <content:encoded>
    &lt;h3 id=&quot;attention&quot;
&gt;ATTENTION:&lt;/h3
&gt;&lt;p
&gt;current gitosis debian package does a chmod -R git:git /var/cache/git, if you allready have a git repository setup be c
arefully! &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473574&quot;
  &gt;#473574&lt;/a
  &gt;&lt;/p
&gt;&lt;h4 id=&quot;install&quot;
&gt;Install&lt;/h4
&gt;&lt;pre
&gt;&lt;code
  &gt;apt-get update
apt-get install gitosis
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;This creates a user git with /var/cache/git as $HOME (which is also the default directory for git-daemon to serve). I&#039;ve changed this to the normal /home/git as i want gitosis only for non-public projects.&lt;/p
&gt;&lt;h4 id=&quot;initialise&quot;
&gt;Initialise&lt;/h4
&gt;&lt;pre
&gt;&lt;code
  &gt;% su git
$ gitosis-init &amp;lt;/tmp/id_rsa.pub 
Initialized empty Git repository in ./
Initialized empty Git repository in ./
&lt;/code
  &gt;&lt;/pre
&gt;&lt;h4 id=&quot;configure&quot;
&gt;Configure&lt;/h4
&gt;&lt;pre
&gt;&lt;code
  &gt;% git clone git@localhost:gitosis-admin.git
% cd gitosis-admin
&lt;/code
  &gt;&lt;/pre
&gt;&lt;p
&gt;see gitosis documentation if you need further help on configuration or &lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;
  &gt;&lt;code
    &gt;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&lt;/code
    &gt;&lt;/a
  &gt;&lt;/p
&gt;&lt;h4 id=&quot;problems&quot;
&gt;Problems:&lt;/h4
&gt;&lt;ul
&gt;&lt;li
  &gt;ssh git@localhost:&lt;pre&gt;&lt;code&gt;Mar 31 14:27:06 god sshd[27051]: User git not allowed because account is locked&lt;/code&gt;&lt;/pre&gt;&lt;p
    &gt;If you encounter something like this then you should update your adduser packet because it is broken. &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433639&quot;
      &gt;#433639&lt;/a
      &gt;&lt;br /&gt; Fix: change the ! in /etc/shadow in the line of your git user to *.&lt;/p
    &gt;&lt;/li
  &gt;&lt;li
  &gt;gitosis config is not updated after push:&lt;pre&gt;&lt;code&gt;chmod 755 $(readlink ~git/repositories/gitosis-admin.git/hooks/post-update)&lt;/code&gt;&lt;/pre&gt;&lt;p
    &gt;The post-update hook is not executable and is a link on debian (&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473613&quot;
      &gt;#473613&lt;/a
      &gt;), the above should temporarily fix this.&lt;/p
    &gt;&lt;/li
  &gt;&lt;/ul
&gt; 
    </content:encoded>

    <pubDate>Mon, 31 Mar 2008 20:09:18 +0200</pubDate>
    <guid isPermaLink="false">http://gebi.supersized.org/archives/4-guid.html</guid>
    
</item>

</channel>
</rss>