X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/92585479a6367ac49a63e1cd185115ecc63b177a..350d73d9c83b01fe16cac24017e3f9bfbd3d6c50:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index a824ff3c2f..4110ff85a2 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -7,488 +7,456 @@ - KDM fail at boot with NVidia cards - and no one try to fix it? - http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html - http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html - Tue, 1 Jun 2010 17:05:00 +0200 + Some notes on Flash in Debian and Debian Edu + http://people.skolelinux.org/pere/blog/Some_notes_on_Flash_in_Debian_and_Debian_Edu.html + http://people.skolelinux.org/pere/blog/Some_notes_on_Flash_in_Debian_and_Debian_Edu.html + Sat, 4 Sep 2010 10:10:00 +0200 -<p>It is strange to watch how a bug in Debian causing KDM to fail to -start at boot when an NVidia video card is used is handled. The -problem seem to be that the nvidia X.org driver uses a long time to -initialize, and this duration is longer than kdm is configured to -wait.</p> - -<p>I came across two bugs related to this issue, -<a href="http://bugs.debian.org/583312">#583312</a> initially filed -against initscripts and passed on to nvidia-glx when it became obvious -that the nvidia drivers were involved, and -<a href="http://bugs.debian.org/524751">#524751</a> initially filed against -kdm and passed on to src:nvidia-graphics-drivers for unknown reasons.</p> - -<p>To me, it seem that no-one is interested in actually solving the -problem nvidia video card owners experience and make sure the Debian -distribution work out of the box for these users. The nvidia driver -maintainers expect kdm to be set up to wait longer, while kdm expect -the nvidia driver maintainers to fix the driver to start faster, and -while they wait for each other I guess the users end up switching to a -distribution that work for them. I have no idea what the solution is, -but I am pretty sure that waiting for each other is not it.</p> - -<p>I wonder why we end up handling bugs this way.</p> +<p>In the <a href="http://popcon.debian.org/unknown/by_vote">Debian +popularity-contest numbers</a>, the adobe-flashplugin package the +second most popular used package that is missing in Debian. The sixth +most popular is flashplayer-mozilla. This is a clear indication that +working flash is important for Debian users. Around 10 percent of the +users submitting data to popcon.debian.org have this package +installed.</p> + +<p>In the report written by Lars Risan in August 2008 +(«<a href="http://wiki.skolelinux.no/Dokumentasjon/Rapporter?action=AttachFile&do=view&target=Skolelinux_i_bruk_rapport_1.0.pdf">Skolelinux +i bruk – Rapport for Hurum kommune, Universitetet i Agder og +stiftelsen SLX Debian Labs</a>»), one of the most important problems +schools experienced with <a href="http://www.skolelinux.org/">Debian +Edu/Skolelinux</a> was the lack of working Flash. A lot of educational +web sites require Flash to work, and lacking working Flash support in +the web browser and the problems with installing it was perceived as a +good reason to stay with Windows.</p> + +<p>I once saw a funny and sad comment in a web forum, where Linux was +said to be the retarded cousin that did not really understand +everything you told him but could work fairly well. This was a +comment regarding the problems Linux have with proprietary formats and +non-standard web pages, and is sad because it exposes a fairly common +understanding of whose fault it is if web pages that only work in for +example Internet Explorer 6 fail to work on Firefox, and funny because +it explain very well how annoying it is for users when Linux +distributions do not work with the documents they receive or the web +pages they want to visit.</p> + +<p>This is part of the reason why I believe it is important for Debian +and Debian Edu to have a well working Flash implementation in the +distribution, to get at least popular sites as Youtube and Google +Video to working out of the box. For Squeeze, Debian have the chance +to include the latest version of Gnash that will make this happen, as +the new release 0.8.8 was published a few weeks ago and is resting in +unstable. The new version work with more sites that version 0.8.7. +The Gnash maintainers have asked for a freeze exception, but the +release team have not had time to reply to it yet. I hope they agree +with me that Flash is important for the Debian desktop users, and thus +accept the new package into Squeeze.</p> - Parallellized boot seem to hold up well in Debian/testing - http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html - http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html - Thu, 27 May 2010 23:55:00 +0200 + My first perl GUI application - controlling a Spykee robot + http://people.skolelinux.org/pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html + http://people.skolelinux.org/pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html + Wed, 1 Sep 2010 21:00:00 +0200 -<p>A few days ago, parallel booting was enabled in Debian/testing. -The feature seem to hold up pretty well, but three fairly serious -issues are known and should be solved: - -<p><ul> - -<li>The wicd package seen to -<a href="http://bugs.debian.org/508289">break NFS mounting</a> and -<a href="http://bugs.debian.org/581586">network setup</a> when -parallel booting is enabled. No idea why, but the wicd maintainer -seem to be on the case.</li> - -<li>The nvidia X driver seem to -<a href="http://bugs.debian.org/583312">have a race condition</a> -triggered more easily when parallel booting is in effect. The -maintainer is on the case.</li> - -<li>The sysv-rc package fail to properly enable dependency based boot -sequencing (the shutdown is broken) when old file-rc users -<a href="http://bugs.debian.org/575080">try to switch back</a> to -sysv-rc. One way to solve it would be for file-rc to create -/etc/init.d/.legacy-bootordering, and another is to try to make -sysv-rc more robust. Will investigate some more and probably upload a -workaround in sysv-rc to help those trying to move from file-rc to -sysv-rc get a working shutdown.</li> - -</ul></p> - -<p>All in all not many surprising issues, and all of them seem -solvable before Squeeze is released. In addition to these there are -some packages with bugs in their dependencies and run level settings, -which I expect will be fixed in a reasonable time span.</p> - -<p>If you report any problems with dependencies in init.d scripts to -the BTS, please usertag the report to get it to show up at -<a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the -list of usertagged bugs related to this</a>.</p> - -<p>Update: Correct bug number to file-rc issue.</p> +<p>This evening I made my first Perl GUI application. The last few +days I have worked on a Perl module for controlling my recently +aquired Spykee robots, and the module is now getting complete enought +that it is possible to use it to control the robot driving at least. +It was now time to figure out how to use it to create some GUI to +allow me to drive the robot around. I picked PerlQt as I have had +positive experiences with the Qt API before, and spent a few minutes +browsing the web for examples. Using Qt Designer seemed like a short +cut, so I ended up writing the perl GUI using Qt Designer and +compiling it into a perl program using the puic program from +libqt-perl. Nothing fancy yet, but it got buttons to connect and +drive around.</p> + +<p>The perl module I have written provide a object oriented API for +controlling the robot. Here is an small example on how to use it:</p> + +<p><pre> +use Spykee; +Spykee::discover(sub {$robot{$_[0]} = $_[1]}); +my $host = (keys %robot)[0]; +my $spykee = Spykee->new(); +$spykee->contact($host, "admin", "admin"); +$spykee->left(); +sleep 2; +$spykee->right(); +sleep 2; +$spykee->forward(); +sleep 2; +$spykee->back(); +sleep 2; +$spykee->stop(); +</pre></p> + +<p>Thanks to the release of the source of the robot firmware, I could +peek into the implementation at the other end to figure out how to +implement the protocol used by the robot. I've implemented several of +the commands the robot understand, but is still missing the camera +support to make it possible to control the robot from remote. First I +want to implement support for uploading new firmware and configuring +the wireless network, to make it possible to bootstrap a Spykee robot +without the producers Windows and MacOSX software (I only have Linux, +so I had to ask a friend to come over to get the robot testing +going. :).</p> + +<p>Will release the source to the public soon, but need to figure out +where to make it available first. I will add a link to +<a href="http://wiki.nuug.no/grupper/robot/">the NUUG wiki</a> for +those that want to check back later to find it.</p> - More flexible firmware handling in debian-installer - http://people.skolelinux.org/pere/blog/More_flexible_firmware_handling_in_debian_installer.html - http://people.skolelinux.org/pere/blog/More_flexible_firmware_handling_in_debian_installer.html - Sat, 22 May 2010 21:30:00 +0200 + Forslag i stortinget om å stoppe elektronisk stemmegiving i Norge + http://people.skolelinux.org/pere/blog/Forslag_i_stortinget_om____stoppe_elektronisk_stemmegiving_i_Norge.html + http://people.skolelinux.org/pere/blog/Forslag_i_stortinget_om____stoppe_elektronisk_stemmegiving_i_Norge.html + Tue, 31 Aug 2010 21:00:00 +0200 -<p>After a long break from debian-installer development, I finally -found time today to return to the project. Having to spend less time -working dependency based boot in debian, as it is almost complete now, -definitely helped freeing some time.</p> - -<p>A while back, I ran into a problem while working on Debian Edu. We -include some firmware packages on the Debian Edu CDs, those needed to -get disk and network controllers working. Without having these -firmware packages available during installation, it is impossible to -install Debian Edu on the given machine, and because our target group -are non-technical people, asking them to provide firmware packages on -an external medium is a support pain. Initially, I expected it to be -enough to include the firmware packages on the CD to get -debian-installer to find and use them. This proved to be wrong. -Next, I hoped it was enough to symlink the relevant firmware packages -to some useful location on the CD (tried /cdrom/ and -/cdrom/firmware/). This also proved to not work, and at this point I -found time to look at the debian-installer code to figure out what was -going to work.</p> - -<p>The firmware loading code is in the hw-detect package, and a closer -look revealed that it would only look for firmware packages outside -the installation media, so the CD was never checked for firmware -packages. It would only check USB sticks, floppies and other -"external" media devices. Today I changed it to also look in the -/cdrom/firmware/ directory on the mounted CD or DVD, which should -solve the problem I ran into with Debian edu. I also changed it to -look in /firmware/, to make sure the installer also find firmware -provided in the initrd when booting the installer via PXE, to allow us -to provide the same feature in the PXE setup included in Debian -Edu.</p> - -<p>To make sure firmware deb packages with a license questions are not -activated without asking if the license is accepted, I extended -hw-detect to look for preinst scripts in the firmware packages, and -run these before activating the firmware during installation. The -license question is asked using debconf in the preinst, so this should -solve the issue for the firmware packages I have looked at so far.</p> - -<p>If you want to discuss the details of these features, please -contact us on debian-boot@lists.debian.org.</p> +<p>Ble tipset i dag om at et forslag om å stoppe forsøkene med +elektronisk stemmegiving utenfor valglokaler er +<a href="http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=46616">til +behandling</a> i Stortinget. +<a href="http://www.stortinget.no/Global/pdf/Representantforslag/2009-2010/dok8-200910-128.pdf">Forslaget</a> +er fremmet av Erna Solberg, Michael Tetzschner og Trond Helleland.</p> + +<p>Håper det får flertall.</p> - Magnetstripeinnhold i billetter fra Flytoget og Hurtigruten - http://people.skolelinux.org/pere/blog/Magnetstripeinnhold_i_billetter_fra_Flytoget_og_Hurtigruten.html - http://people.skolelinux.org/pere/blog/Magnetstripeinnhold_i_billetter_fra_Flytoget_og_Hurtigruten.html - Fri, 21 May 2010 16:00:00 +0200 + Broken hard link handling with sshfs + http://people.skolelinux.org/pere/blog/Broken_hard_link_handling_with_sshfs.html + http://people.skolelinux.org/pere/blog/Broken_hard_link_handling_with_sshfs.html + Mon, 30 Aug 2010 19:30:00 +0200 -<p>For en stund tilbake kjøpte jeg en magnetkortleser for å kunne -titte på hva som er skrevet inn på magnetstripene til ulike kort. Har -ikke hatt tid til å analysere mange kort så langt, men tenkte jeg -skulle dele innholdet på to kort med mine lesere.</p> - -<p>For noen dager siden tok jeg flyet til Harstad og Hurtigruten til -Bergen. Flytoget fra Oslo S til flyplassen ga meg en billett med -magnetstripe. Påtrykket finner jeg følgende informasjon:</p> +<p>Just got an email from Tobias Gruetzmacher as a followup on my +<a href="http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html">previous +post about sshfs</a>. He reported another problem with sshfs. It +fail to handle hard links properly. A simple way to spot this is to +look at the . and .. entries in the directory tree. These should have +a link count >1, but on sshfs the count is 1. I just tested to see +what happen when trying to hardlink, and this fail as well:</p> <pre> -Flytoget Airport Express Train - -Fra - Til : Oslo Sentralstasjon -Kategori : Voksen -Pris : Nok 170,00 -Herav mva. 8,00% : NOK 12,59 -Betaling : Kontant -Til - Fra : Oslo Lufthavn -Utstedt: : 08.05.10 -Gyldig Fra-Til : 08.05.10-07.11.10 -Billetttype : Enkeltbillett - -102-1015-100508-48382-01-08 +% ln foo bar +ln: creating hard link `bar' => `foo': Function not implemented +% </pre> -<p>På selve magnetstripen er innholdet -<tt>;E?+900120011=23250996541068112619257138248441708433322932704083389389062603279671261502492655?</tt>. -Aner ikke hva innholdet representerer, og det er lite overlapp mellom -det jeg ser trykket på billetten og det jeg ser av tegn i -magnetstripen. Håper det betyr at de bruker kryptografiske metoder -for å gjøre det vanskelig å forfalske billetter.</p> - -<p>Den andre billetten er fra Hurtigruten, der jeg mistenker at -strekkoden på fronten er mer brukt enn magnetstripen (det var i hvert -fall den biten vi stakk inn i dørlåsen).</p> - -<p>Påtrykket forsiden er følgende:</p> - -<pre> -Romnummer 727 -Hurtigruten -Midnatsol -Reinholdtsen -Petter -Bookingno: SAX69 0742193 -Harstad-Bergen -Dep: 09.05.2010 Arr: 12.05.2010 -Lugar fra Risøyhamn -Kost: FRO=4 -</pre> +<p>I have not yet found time to implement a test for this in my file +system test code, but believe having working hard links is useful to +avoid surprised unix programs. Not as useful as working file locking +and symlinks, which are required to get a working desktop, but useful +nevertheless. :)</p> -<p>På selve magnetstripen er innholdet -<tt>;1316010007421930=00000000000000000000?+E?</tt>. Heller ikke her -ser jeg mye korrespondanse mellom påtrykk og magnetstripe.</p> +<p>The latest version of the file system test code is available via +git from +<a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a></p> - Pieces of the roaming laptop puzzle in Debian - http://people.skolelinux.org/pere/blog/Pieces_of_the_roaming_laptop_puzzle_in_Debian.html - http://people.skolelinux.org/pere/blog/Pieces_of_the_roaming_laptop_puzzle_in_Debian.html - Wed, 19 May 2010 19:00:00 +0200 + Sikkerhetsteateret på flyplassene fortsetter + http://people.skolelinux.org/pere/blog/Sikkerhetsteateret_p___flyplassene_fortsetter.html + http://people.skolelinux.org/pere/blog/Sikkerhetsteateret_p___flyplassene_fortsetter.html + Sat, 28 Aug 2010 10:40:00 +0200 -<p>Today, the last piece of the puzzle for roaming laptops in Debian -Edu finally entered the Debian archive. Today, the new -<a href="http://packages.qa.debian.org/libp/libpam-mklocaluser.html">libpam-mklocaluser</a> -package was accepted. Two days ago, two other pieces was accepted -into unstable. The -<a href="http://packages.qa.debian.org/p/pam-python.html">pam-python</a> -package needed by libpam-mklocaluser, and the -<a href="http://packages.qa.debian.org/s/sssd.html">sssd</a> package -passed NEW on Monday. In addition, the -<a href="http://packages.qa.debian.org/libp/libpam-ccreds.html">libpam-ccreds</a> -package we need is in experimental (version 10-4) since Saturday, and -hopefully will be moved to unstable soon.</p> - -<p>This collection of packages allow for two different setups for -roaming laptops. The traditional setup would be using libpam-ccreds, -nscd and libpam-mklocaluser with LDAP or Kerberos authentication, -which should work out of the box if the configuration changes proposed -for nscd in <a href="http://bugs.debian.org/485282">BTS report -#485282</a> is implemented. The alternative setup is to use sssd with -libpam-mklocaluser to connect to LDAP or Kerberos and let sssd take -care of the caching of passwords and group information.</p> - -<p>I have so far been unable to get sssd to work with the LDAP server -at the University, but suspect the issue is some SSL/GnuTLS related -problem with the server certificate. I plan to update the Debian -package to version 1.2, which is scheduled for next week, and hope to -find time to make sure the next release will include both the -Debian/Ubuntu specific patches. Upstream is friendly and responsive, -and I am sure we will find a good solution.</p> - -<p>The idea is to set up the roaming laptops to authenticate using -LDAP or Kerberos and create a local user with home directory in /home/ -when a usre in LDAP logs in via KDM or GDM for the first time, and -cache the password for offline checking, as well as caching group -memberhips and other relevant LDAP information. The -libpam-mklocaluser package was created to make sure the local home -directory is in /home/, instead of /site/server/directory/ which would -be the home directory if pam_mkhomedir was used. To avoid confusion -with support requests and configuration, we do not want local laptops -to have users in a path that is used for the same users home directory -on the home directory servers.</p> - -<p>One annoying problem with gdm is that it do not show the PAM -message passed to the user from libpam-mklocaluser when the local user -is created. Instead gdm simply reject the login with some generic -message. The message is shown in kdm, ssh and login, so I guess it is -a bug in gdm. Have not investigated if there is some other message -type that can be used instead to get gdm to also show the message.</p> - -<p>If you want to help out with implementing this for Debian Edu, -please contact us on debian-edu@lists.debian.org.</p> +<p>Jeg skrev for et halvt år siden hvordan +<a href="http://people.skolelinux.org/pere/blog/Sikkerhet__teater__og_hvordan_gj__re_verden_sikrere.html">samfunnet +kaster bort ressurser på sikkerhetstiltak som ikke fungerer</a>. Kom +nettopp over en +<a href="http://www.askthepilot.com/essays-and-stories/terrorism-tweezers-and-terminal-madness-an-essay-on-security/">historie +fra en pilot fra USA</a> som kommenterer det samme. Jeg mistenker det +kun er uvitenhet og autoritetstro som gjør at så få protesterer. Har +veldig sans for piloten omtalt i <a +href="http://www.aftenposten.no/nyheter/iriks/article2057501.ece">Aftenposten</a> 2007-10-23, +og skulle ønske flere rettet oppmerksomhet mot problemet. Det gir +ikke meg trygghetsfølelse på flyplassene når jeg ser at +flyplassadministrasjonen kaster bort folk, penger og tid på tull i +stedet for ting som bidrar til reell økning av sikkerheten. Det +forteller meg jo at vurderingsevnen til de som burde bidra til økt +sikkerhet er svært sviktende, noe som ikke taler godt for de andre +tiltakene.</p> + +<p>Mon tro hva som skjer hvis det fantes en enkel brosjyre å skrive ut +fra Internet som forklarte hva som er galt med sikkerhetsopplegget på +flyplassene, og folk skrev ut og la en bunke på flyplassene når de +passerte. Kanskje det ville fått flere til å få øynene opp for +problemet.</p> + +<p>Personlig synes jeg flyopplevelsen er blitt så avskyelig at jeg +forsøker å klare meg med tog, bil og båt for å slippe ubehaget. Det +er dog noe vanskelig i det langstrakte Norge og for å kunne besøke de +delene av verden jeg ønsker å nå. Mistenker at flere har det slik, og +at dette går ut over inntjeningen til flyselskapene. Det er antagelig +en god ting sett fra et miljøperspektiv, men det er en annen sak.</p> - Parallellized boot is now the default in Debian/unstable - http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html - http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html - Fri, 14 May 2010 22:40:00 +0200 + Skolelinux i Osloskolen + http://people.skolelinux.org/pere/blog/Skolelinux_i_Osloskolen.html + http://people.skolelinux.org/pere/blog/Skolelinux_i_Osloskolen.html + Thu, 26 Aug 2010 22:25:00 +0200 -<p>Since this evening, parallel booting is the default in -Debian/unstable for machines using dependency based boot sequencing. -Apparently the testing of concurrent booting has been wider than -expected, if I am to believe the -<a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input -on debian-devel@</a>, and I concluded a few days ago to move forward -with the feature this weekend, to give us some time to detect any -remaining problems before Squeeze is frozen. If serious problems are -detected, it is simple to change the default back to sequential boot. -The upload of the new sysvinit package also activate a new upstream -version.</p> - -More information about -<a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency -based boot sequencing</a> is available from the Debian wiki. It is -currently possible to disable parallel booting when one run into -problems caused by it, by adding this line to /etc/default/rcS:</p> - -<blockquote><pre> -CONCURRENCY=none -</pre></blockquote> - -<p>If you report any problems with dependencies in init.d scripts to -the BTS, please usertag the report to get it to show up at -<a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the -list of usertagged bugs related to this</a>.</p> +<p>Denne høsten skal endelig alle Osloskolene få mulighet til å bruke +<a href="http://www.skolelinux.org/">Skolelinux</a>. Ny IT-løsning +har vært rullet ut i noen måneder nå, og så vidt jeg fikk vite før +sommeren skulle alle skoler ha nytt opplegg på plass før oppstart nå i +høst. På alle skolene skal en kunne velge ved installasjon om en skal +ha Windows eller Skolelinux på maskinene, og en kan i tillegg +PXE-boote maskinene over nett som tynne klienter eller diskløse +arbeidsstasjoner. Jeg er spent på hvor mange skoler som velger å ta i +bruk Skolelinux, og gleder meg til å se hvordan dette utvikler seg. +Løsningen leveres av +<a href="http://www.logica.no/">Logica</a> med +<a href="http://www.slxdrift.no/">Skolelinux Drift AS</a> som +underleverandør, og jeg har vært involvert i utviklingen av løsningen +via Skolelinux Drift AS siden prosjektet starter. Jeg synes det er +fantastisk at Skolelinux er kommet så langt siden vi startet i 2001 at +alle elevene i Osloskolene nå skal få mulighet til å bruke +løsningen. Jeg håper de vil sette pris på alle de +<a href="http://www.skolelinux.no/linux-signpost/">fantastiske +brukerprogrammene</a> som er tilgjengelig i Skolelinux.</p> - Sitesummary tip: Listing MAC address of all clients - http://people.skolelinux.org/pere/blog/Sitesummary_tip__Listing_MAC_address_of_all_clients.html - http://people.skolelinux.org/pere/blog/Sitesummary_tip__Listing_MAC_address_of_all_clients.html - Fri, 14 May 2010 21:10:00 +0200 + Broken umask handling with sshfs + http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html + http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html + Thu, 26 Aug 2010 13:30:00 +0200 -<p>In the recent Debian Edu versions, the -<a href="http://wiki.debian.org/DebianEdu/HowTo/SiteSummary">sitesummary -system</a> is used to keep track of the machines in the school -network. Each machine will automatically report its status to the -central server after boot and once per night. The network setup is -also reported, and using this information it is possible to get the -MAC address of all network interfaces in the machines. This is useful -to update the DHCP configuration.</p> - -<p>To give some idea how to use sitesummary, here is a one-liner to -ist all MAC addresses of all machines reporting to sitesummary. Run -this on the collector host:</p> - -<blockquote><pre> -perl -MSiteSummary -e 'for_all_hosts(sub { print join(" ", get_macaddresses(shift)), "\n"; });' -</pre></blockquote> - -<p>This will list all MAC addresses assosiated with all machine, one -line per machine and with space between the MAC addresses.</p> - -<p>To allow system administrators easier job at adding static DHCP -addresses for hosts, it would be possible to extend this to fetch -machine information from sitesummary and update the DHCP and DNS -tables in LDAP using this information. Such tool is unfortunately not -written yet.</p> +<p>My file system sematics program +<a href="http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html">presented +a few days ago</a> is very useful to verify that a file system can +work as a unix home directory,and today I had to extend it a bit. I'm +looking into alternatives for home directory access here at the +University of Oslo, and one of the options is sshfs. My friend +Finn-Arne mentioned a while back that they had used sshfs with Debian +Edu, but stopped because of problems. I asked today what the problems +where, and he mentioned that sshfs failed to handle umask properly. +Trying to detect the problem I wrote this addition to my fs testing +script:</p> + +<pre> +mode_t touch_get_mode(const char *name, mode_t mode) { + mode_t retval = 0; + int fd = open(name, O_RDWR|O_CREAT|O_LARGEFILE, mode); + if (-1 != fd) { + unlink(name); + struct stat statbuf; + if (-1 != fstat(fd, &statbuf)) { + retval = statbuf.st_mode & 0x1ff; + } + close(fd); + } + return retval; +} + +/* Try to detect problem discovered using sshfs */ +int test_umask(void) { + printf("info: testing umask effect on file creation\n"); + + mode_t orig_umask = umask(000); + mode_t newmode; + if (0666 != (newmode = touch_get_mode("foobar", 0666))) { + printf(" error: Wrong file mode %o when creating using mode 666 and umask 000\n", + newmode); + } + umask(007); + if (0660 != (newmode = touch_get_mode("foobar", 0666))) { + printf(" error: Wrong file mode %o when creating using mode 666 and umask 007\n", + newmode); + } + + umask (orig_umask); + return 0; +} + +int main(int argc, char **argv) { + [...] + test_umask(); + return 0; +} +</pre> + +<p>Sure enough. On NFS to a netapp, I get this result:</p> + +<pre> +Testing POSIX/Unix sematics on file system +info: testing symlink creation +info: testing subdirectory creation +info: testing fcntl locking + Read-locking 1 byte from 1073741824 + Read-locking 510 byte from 1073741826 + Unlocking 1 byte from 1073741824 + Write-locking 1 byte from 1073741824 + Write-locking 510 byte from 1073741826 + Unlocking 2 byte from 1073741824 +info: testing umask effect on file creation +</pre> + +<p>When mounting the same directory using sshfs, I get this +result:</p> + +<pre> +Testing POSIX/Unix sematics on file system +info: testing symlink creation +info: testing subdirectory creation +info: testing fcntl locking + Read-locking 1 byte from 1073741824 + Read-locking 510 byte from 1073741826 + Unlocking 1 byte from 1073741824 + Write-locking 1 byte from 1073741824 + Write-locking 510 byte from 1073741826 + Unlocking 2 byte from 1073741824 +info: testing umask effect on file creation + error: Wrong file mode 644 when creating using mode 666 and umask 000 + error: Wrong file mode 640 when creating using mode 666 and umask 007 +</pre> + +<p>So, I can conclude that sshfs is better than smb to a Netapp or a +Windows server, but not good enough to be used as a home +directory.</p> + +<p>Update 2010-08-26: Reported the issue in +<a href="http://bugs.debian.org/594498">BTS report #594498</a></p> + +<p>Update 2010-08-27: Michael Gebetsroither report that he found the +script so useful that he created a GIT repository and stored it in +<a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a>.</p> - systemd, an interesting alternative to upstart - http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html - http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html - Thu, 13 May 2010 22:20:00 +0200 + Elektronisk stemmegiving er ikke til å stole på - heller ikke i Norge + http://people.skolelinux.org/pere/blog/Elektronisk_stemmegiving_er_ikke_til____stole_p_____heller_ikke_i_Norge.html + http://people.skolelinux.org/pere/blog/Elektronisk_stemmegiving_er_ikke_til____stole_p_____heller_ikke_i_Norge.html + Mon, 23 Aug 2010 19:30:00 +0200 -<p>The last few days a new boot system called -<a href="http://www.freedesktop.org/wiki/Software/systemd">systemd</a> -has been -<a href="http://0pointer.de/blog/projects/systemd.html">introduced</a> - -to the free software world. I have not yet had time to play around -with it, but it seem to be a very interesting alternative to -<a href="http://upstart.ubuntu.com/">upstart</a>, and might prove to be -a good alternative for Debian when we are able to switch to an event -based boot system. Tollef is -<a href="http://bugs.debian.org/580814">in the process</a> of getting -systemd into Debian, and I look forward to seeing how well it work. I -like the fact that systemd handles init.d scripts with dependency -information natively, allowing them to run in parallel where upstart -at the moment do not.</p> - -<p>Unfortunately do systemd have the same problem as upstart regarding -platform support. It only work on recent Linux kernels, and also need -some new kernel features enabled to function properly. This means -kFreeBSD and Hurd ports of Debian will need a port or a different boot -system. Not sure how that will be handled if systemd proves to be the -way forward.</p> - -<p>In the mean time, based on the -<a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input -on debian-devel@</a> regarding parallel booting in Debian, I have -decided to enable full parallel booting as the default in Debian as -soon as possible (probably this weekend or early next week), to see if -there are any remaining serious bugs in the init.d dependencies. A -new version of the sysvinit package implementing this change is -already in experimental. If all go well, Squeeze will be released -with parallel booting enabled by default.</p> +<p>I Norge pågår en prosess for å +<a href="http://www.e-valg.dep.no/">innføre elektronisk +stemmegiving</a> ved kommune- og stortingsvalg. Dette skal +introduseres i 2011. Det er all grunn til å tro at valg i Norge ikke +vil være til å stole på hvis dette blir gjennomført. Da det hele var +oppe til høring i 2006 forfattet jeg +<a href="http://www.nuug.no/dokumenter/valg-horing-2006-09.pdf">en +høringsuttalelse fra NUUG</a> (og EFN som hengte seg på) som skisserte +hvilke punkter som må oppfylles for at en skal kunne stole på et valg, +og elektronisk stemmegiving mangler flere av disse. Elektronisk +stemmegiving er for alle praktiske formål å putte ens stemme i en sort +boks under andres kontroll, og satse på at de som har kontroll med +boksen er til å stole på - uten at en har mulighet til å verifisere +dette selv. Det er ikke slik en gjennomfører demokratiske valg.</p> + +<p>Da problemet er fundamentalt med hvordan elektronisk stemmegiving +må fungere for at også ikke-krypografer skal kunne delta, har det vært +mange rapporter om hvordan elektronisk stemmegiving har sviktet i land +etter land. En +<a href="http://wiki.nuug.no/uttalelser/2006-elektronisk-stemmegiving">liten +samling referanser</a> finnes på NUUGs wiki. Den siste er fra India, +der valgkomisjonen har valgt +<a href="http://www.freedom-to-tinker.com/blog/jhalderm/electronic-voting-researcher-arrested-over-anonymous-source">å +pusse politiet på en forsker</a> som har dokumentert svakheter i +valgsystemet.</p> + +<p>Her i Norge har en valgt en annen tilnærming, der en forsøker seg +med teknobabbel for å få befolkningen til å tro at dette skal bli +sikkert. Husk, elektronisk stemmegiving underminerer de demokratiske +valgene i Norge, og bør ikke innføres.</p> + +<p>Den offentlige diskusjonen blir litt vanskelig av at media har +valgt å kalle dette "evalg", som kan sies å både gjelde elektronisk +opptelling av valget som Norge har gjort siden 60-tallet og som er en +svært god ide, og elektronisk opptelling som er en svært dårlig ide. +Diskusjonen gir ikke mening hvis en skal diskutere om en er for eller +mot "evalg", og jeg forsøker derfor å være klar på at jeg snakker om +elektronisk stemmegiving og unngå begrepet "evalg".</p> - Parallellizing the boot in Debian Squeeze - ready for wider testing - http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html - http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html - Thu, 6 May 2010 23:25:00 +0200 + Robot, reis deg... + http://people.skolelinux.org/pere/blog/Robot__reis_deg___.html + http://people.skolelinux.org/pere/blog/Robot__reis_deg___.html + Sat, 21 Aug 2010 22:10:00 +0200 -<p>These days, the init.d script dependencies in Squeeze are quite -complete, so complete that it is actually possible to run all the -init.d scripts in parallell based on these dependencies. If you want -to test your Squeeze system, make sure -<a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency -based boot sequencing</a> is enabled, and add this line to -/etc/default/rcS:</p> - -<blockquote><pre> -CONCURRENCY=makefile -</pre></blockquote> - -<p>That is it. It will cause sysv-rc to use the startpar tool to run -scripts in parallel using the dependency information stored in -/etc/init.d/.depend.boot, /etc/init.d/.depend.start and -/etc/init.d/.depend.stop to order the scripts. Startpar is configured -to try to start the kdm and gdm scripts as early as possible, and will -start the facilities required by kdm or gdm as early as possible to -make this happen.</p> - -<p>Give it a try, and see if you like the result. If some services -fail to start properly, it is most likely because they have incomplete -init.d script dependencies in their startup script (or some of their -dependent scripts have incomplete dependencies). Report bugs and get -the package maintainers to fix it. :)</p> - -<p>Running scripts in parallel could be the default in Debian when we -manage to get the init.d script dependencies complete and correct. I -expect we will get there in Squeeze+1, if we get manage to test and -fix the remaining issues.</p> - -<p>If you report any problems with dependencies in init.d scripts to -the BTS, please usertag the report to get it to show up at -<a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the -list of usertagged bugs related to this</a>.</p> +<p>I dag fikk jeg endelig tittet litt på mine nyinnkjøpte roboter, og +har brukt noen timer til å google etter interessante referanser og +aktuell kildekode for bruk på Linux. Det mest lovende så langt er +<a href="http://ispykee.toyz.org/">ispykee</a>, som har en +BSD-lisensiert linux-daemon som står som mellomledd mellom roboter på +lokalnettet og en sentral tjeneste der en iPhone kan koble seg opp for +å fjernstyre roboten. Linux-daemonen implementerer deler av +protokollen som roboten forstår. Etter å ha knotet litt med å oppnå +kontakt med roboten (den oppretter et eget ad-hoc wifi-nett, så jeg +måtte gå av mitt vanlige nett for å få kontakt), og kommet frem til at +den lytter på IP-port 9000 og 9001, gikk jeg i gang med å finne ut +hvordan jeg kunne snakke med roboten vha. disse portene. Robotbiten +av protokollen er publisert av produsenten med GPL-lisens, slik at det +er mulig å se hvordan protokollen fungerer. Det finnes en java-klient +for Android som så ganske snasen ut, men fant ingen kildekode for +denne. Derimot hadde iphone-løsningen kildekode, så jeg tok +utgangspunkt i den.</p> + +<p>Daemonen ville i utgangspunktet forsøke å kontakte den sentrale +tjenesten som iphone-programmet kobler seg til. Jeg skrev dette om +til i stedet å sette opp en nettverkstjeneste på min lokale maskin, +som jeg kan koble meg opp til med telnet og gi kommandoer til roboten +(act, forward, right, left, etc). Det involverte i praksis å bytte ut +socket()/connect() med socket()/bind()/listen()/accept() for å gjøre +klienten om til en tjener.</p> + +<p>Mens jeg har forsøkt å få roboten til å bevege seg har min samboer +skrudd sammen resten av roboten for å få montert kamera og plastpynten +(armer, plastfiber for lys). Nå er det hele montert, og roboten er +klar til bruk. Må få flyttet den over til mitt vanlige trådløsnett +før det blir praktisk, men de bitene av protokollen er ikke +implementert i ispykee-daemonen, så der må jeg enten få tak i en mac +eller en windows-maskin, eller implementere det selv.</p> + +<p>Vi var tre som kjøpte slike roboter, og vi har blitt enige om å +samle notater og referanser på <a +href="http://wiki.nuug.no/grupper/robot/">NUUGs wiki</a>. Ta en titt +der hvis du er nysgjerrig.</p> - Forcing new users to change their password on first login - http://people.skolelinux.org/pere/blog/Forcing_new_users_to_change_their_password_on_first_login.html - http://people.skolelinux.org/pere/blog/Forcing_new_users_to_change_their_password_on_first_login.html - Sun, 2 May 2010 13:47:00 +0200 + 2 Spykee-roboter i hus, nå skal det lekes + http://people.skolelinux.org/pere/blog/2_Spykee_roboter_i_hus__n___skal_det_lekes.html + http://people.skolelinux.org/pere/blog/2_Spykee_roboter_i_hus__n___skal_det_lekes.html + Wed, 18 Aug 2010 13:30:00 +0200 -<p>One interesting feature in Active Directory, is the ability to -create a new user with an expired password, and thus force the user to -change the password on the first login attempt.</p> - -<p>I'm not quite sure how to do that with the LDAP setup in Debian -Edu, but did some initial testing with a local account. The account -and password aging information is available in /etc/shadow, but -unfortunately, it is not possible to specify an expiration time for -passwords, only a maximum age for passwords.</p> - -<p>A freshly created account (using adduser test) will have these -settings in /etc/shadow:</p> - -<blockquote><pre> -root@tjener:~# chage -l test -Last password change : May 02, 2010 -Password expires : never -Password inactive : never -Account expires : never -Minimum number of days between password change : 0 -Maximum number of days between password change : 99999 -Number of days of warning before password expires : 7 -root@tjener:~# -</pre></blockquote> - -<p>The only way I could come up with to create a user with an expired -account, is to change the date of the last password change to the -lowest value possible (January 1th 1970), and the maximum password age -to the difference in days between that date and today. To make it -simple, I went for 30 years (30 * 365 = 10950) and January 2th (to -avoid testing if 0 is a valid value).</p> - -<p>After using these commands to set it up, it seem to work as -intended:</p> - -<blockquote><pre> -root@tjener:~# chage -d 1 test; chage -M 10950 test -root@tjener:~# chage -l test -Last password change : Jan 02, 1970 -Password expires : never -Password inactive : never -Account expires : never -Minimum number of days between password change : 0 -Maximum number of days between password change : 10950 -Number of days of warning before password expires : 7 -root@tjener:~# -</pre></blockquote> - -<p>So far I have tested this with ssh and console, and kdm (in -Squeeze) login, and all ask for a new password before login in the -user (with ssh, I was thrown out and had to log in again).</p> - -<p>Perhaps we should set up something similar for Debian Edu, to make -sure only the user itself have the account password?</p> - -<p>If you want to comment on or help out with implementing this for -Debian Edu, please contact us on debian-edu@lists.debian.org.</p> - -<p>Update 2010-05-02 17:20: Paul Tötterman tells me on IRC that the -shadow(8) page in Debian/testing now state that setting the date of -last password change to zero (0) will force the password to be changed -on the first login. This was not mentioned in the manual in Lenny, so -I did not notice this in my initial testing. I have tested it on -Squeeze, and '<tt>chage -d 0 username</tt>' do work there. I have not -tested it on Lenny yet.</p> - -<p>Update 2010-05-02-19:05: Jim Paris tells me via email that an -equivalent command to expire a password is '<tt>passwd -e -username</tt>', which insert zero into the date of the last password -change.</p> +<p>Jeg kjøpte nettopp to +<a href="http://www.spykee-robot.com/">Spykee</a>-roboter, for test og +leking. Kjøpte to da det var så billige, og gir meg mulighet til å +eksperimentere uten å være veldig redd for å ødelegge alt ved å bytte +ut firmware og slikt. Oppdaget at lekebutikken på Bryn senter hadde +en liten stabel på lager som de ikke hadde klart å selge ut etter +fjorårets juleinnkjøp, og var villig til å selge for en femtedel av +vanlig pris. Jeg, Ronny og Jarle har skaffet oss restbeholdningen, og +det blir morsomt å se hva vi får ut av dette.</p> + +<p>Roboten har belter styrt av to motorer, kamera, høytaler, mikrofon +og wifi-tilkobling. Det hele styrt av en GPL-lisensiert databoks som +jeg mistenker kjører linux. Firmware-kildekoden ble visst publisert i +mai. Eneste utfordringen er at kontroller-programvaren kun finnes til +Windows, men det må en kunne jobbe seg rundt når vi har kildekoden til +firmwaren. :)</p> + +<ul> +<li><a href="http://en.wikipedia.org/wiki/Spykee">Wikipedia-oppføring</a></li> +<li><a href=http://www.spykeeworld.com/spykee/US/freeSoftware.html">Nedlasting av firmware-kilden</a></li> +<li><a href="http://wiki.nuug.no/grupper/robot">prosjektwiki hos NUUG</a></li> +</ul>