## Don't set an empty root password on Chrome OS

(by )

So I got this Chromebook in Developer Mode and wanted to set a root password to atleast protect it a little.

Easy:

sudo chromeos-setdevpasswd


Oh, wait. You pressed enter twice here? Backup your data and reset the device.

This is what chromeos-setdevpasswd does:

#!/bin/sh

mkdir -p /mnt/stateful_partition/etc
echo "chronos:$(openssl passwd -1)" > /mnt/stateful_partition/etc/devmode.passwd  openssl does not care that you just used an empty password, atleast if you also verify it. But so do su and sudo, which means you won’t be able to get root rights again. But it’s Chrome OS after all, so most things are stored in your Google profile anyway, resetting and restoring the thing is done easily. ## Samsung Chromebook - a short review (by ) One week ago I purchased a Chromebook. To be exact I purchased the Samsung Chromebook 303c12 (the one without UMTS). It arrived on Tuesday. I wanted a small second device for some day-to-day stuff. I already own a tablet, but even with an external keyboard it is not the best option if you want to do a little bit more multi-tasking or writing. As Chromebooks are cheap and used devices can be bought for just over 100€, I went for it. ## Hardware The Samsung Chromebook looks a lot like Macbooks, which is not bad at all. But in contrast to Macbooks the complete case is plastic. It feels rather cheap and is easily scratched. The keyboard thus is good. With its slightly unusual layout including a Search key and other special keys it works perfectly inside Chrome OS. Just one small problem: I couldn’t set a nodeadkeys-layout, so ^ or ~ takes two keystrokes to type. The screen has a good size and a resolution of 1366x768, which is the same as my slightly bigger Thinkpad. From my Thinkpad I was used to great colors no matter what perspective I had. Not so with the Chromebook. The slightest tilt messes with the colors. I feel like I need to be a lot more careful with this device than with my Thinkpad, but it’s not intended to be my outdoor and day-to-day device, so I’m fine with it. ## Software This thing is booted damn fast. In just about 10-15 seconds from cold start it is fully loaded and usable, if only suspended it’s even faster. But in real usage it’s noticeable that it is powered by a slow ARM processor. Sites load fast and are mostly lag-free, except from Google’s own social network Google+, which lags horribly. As it uses Chrome OS there’s an App for almost everything. Right now I use TextDown or Text.app for writing, but I also came across Poe, another Markdown editor with instant preview. Let’s see what I stick with, I have not decided yet. All of them lack a few things, but again all of them are Chrome apps programmed in Javascript, so it’s possible to extend them to my needs. Keep in mind that all installed applications and most settings are synced with the Chrome instance on your desktop if that is linked to the same Google account. This was a bit annoying at first, but I can live with that. Apart from that I’m not totally happy with a browser-only environment, but Chrome OS got you covered here as well. It comes with an usable shell in Developer Mode. Booting into Developer Mode is as easy as hitting Esc, Reload and Power, then hitting Ctrl+D in the Recovery screen, pressing it again and waiting 15 minutes, letting the Chromebook do it’s thing. Yeah, you get the idea. The next thing I did was installing crouton, the “Chromium OS Universal Chroot Environment”. Once this is done (and please don’t fully shutdown the device, you would have to go through all of this again), download the script, open a shell and execute it. A few moments later you have a fully working Ubuntu-like chroot at your hands. With this I now have a device with nearly everything I need (proper SSH client, a shell, vim, …). If you do this as well, install Crosh Window to get a window for the shell itself, where things like Ctrl+W work as expected (and don’t close the window). Downside at the moment: umlauts are not supported in crosh. With this device came an upgrade for Google Drive including 100 Gb of extra space. Linux clients seem a bit limited at the moment. I only found Insync, which costs 15$ once (and you’re only informed about this after you installed the application and registered your account) and grive, which only syncs on invocation and exits afterwards (no long-running sync-all-the-time mode). Thus Google Drive is not a real option right now.

Another problem is: all my data is already shared through Dropbox, switching to yet another Cloud storage comes with it’s own problems. As there is still no Arm client for Dropbox, using it in a chroot is not an option either. For now I settled with btsync, the Torrent-powered Dropbox replacement. It’s still proprietary but the easiest option right now (and ARM-compatible).

Apart from the usual *nix stuff there are some web apps I will try to use more on this device, especially things like Nitrous.IO or Cloud9 for a development environment in the cloud. And I need to clean up my config scripts for various things to make it more easy to share them between devices.

## Conclusion

The Samsung Chromebook is a great, cheap device, which is quite good for most things I need it for. The default OS is limited, but under the hood it’s just Linux, so with the right tools it can be used to its full extend.

## Multiple slides on one side in one pdf

(by )

Ever had multiple slide sets, e.g. from a lecture, and you needed an overview to print out? With LaTeX that’s easy:

\documentclass[a4paper,12pt,landscape]{article}

\usepackage{pdfpages}

\begin{document}
\includepdf[offset=5mm 0, nup=4x4, pages={3,4,5,6}]{slide-set-1.pdf}
\includepdf[offset=5mm 0, nup=4x4, pages={2,10,20,42}]{slide-set-2.pdf}
\end{document}


Now just compile this using pdflatex and you have a single pdf with a nice overview.

## Fixing a Vagrant "hostonlyif" error

(by )

tl;dr: Load the correct module: sudo modprobe vboxnetadp

I recently came across an article about LXC, Exploring LXC Networking, which used Vagrant to get a development machine up and running.

I wanted to try it, but stumbled across a problem for which I mostly found the OS X solution:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart


But this does not work on Linux. I finally found the working solution in the post Resolve a hostonlyif create error with vagrant. So for full documentation I repeat it here again.

I used the following Vagrant file:

Vagrant.configure(2) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"

config.vm.provision :shell, :inline => pkg_cmd

# Create a private network
config.vm.network :private_network, ip: "10.0.4.2"

# Create a public network
config.vm.network :public_network
end


After vagrant up I got the following error:

\$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl:
No such file or directory

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface,
interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file VBoxManageHostonly.cpp


sudo modprobe vboxnetadp


After that vagrant up worked as expected and the machine was accessible via SSH:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Available bridged network interfaces:
1) wlan0
2) eth0
What interface should the network bridge to? 1
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] VM already provisioned. Run vagrant provision or use --provision to force it


## 30C3

(by )

At the end of last year I was once again in Hamburg, this year for the 30th Chaos Communication Congress. And it was simply awesome. Great talks, an amazing location and lots and lots of great people.

Videos are available at cdn.media.ccc.de

You should definitely watch Glenn Greenwald’s keynote (CCC TV link). Other talks I watched that were good:

Some of the pictures I took:

More photos (not from me) can be found at flickr.