Time For VirtualBox

I’ll get around to the “why” of this in another post, but I’ve decided to setup VirtualBox on one of my Windows machines.

virtualbox

With using Raspbian and Cubian, I figured I should probably keep things consistent and go with Debian.

I’m not sure whether it’s my inexperience with VirtualBox, my inexperience with Debian, or something related to Windows 7, but I seem to be having a few issues running a graphical desktop environment.

Things seem to go OK at first, but after using it for more than 5 minutes, suddenly my interface disappears, and the only way to get everything back is to SSH into it and issue a reboot command (or force a reboot from within VirtualBox itself).

I’m not that bothered as I didn’t really need it anyway.  It would’ve been nice to have a handy graphical interface to try out some Linux apps at a decent speed, but it’s not essential.

Mostly I’m setting this up for cross-compiling code for the Raspberry Pi, CubieBoard, CubieTruck, etc.  So, I’ve installed just the base minimum “standard” installation, and I’ll add everything else as needed.

Having now had a good play with the Raspbian and Cubian distros, there’s a few things I want to change about the default Debian setup so there’s a bit more consistency between all the machines.

This is one of those posts to remind me what I did in case I need to do it again at some point.

So, first up, disabling root login and adding the default user to the sudo group without having to enter a password.

Between this article, this article, and comparing some files on the CubieBoard, it was a doddle.

First up, login as root and install sudo.

apt-get install sudo

Then add my default user “john” to the sudo group.

usermod -a -G sudo john

Then we edit /etc/sudoers.  We want to modify this line…

%sudo ALL=(ALL:ALL) ALL

to…

%sudo ALL=NOPASSWD: ALL

This lets me switch to root any time I really need it without having to enter my password again.

Now, log out of the root account, and test to make sure it works

Login as “john” (or whatever your regular user happens to be), and then…

sudo su

You should be presented with a root@ prompt.  If you are, then we prevent the root account from being able to login directly.

passwd -l root

And that’s it, all done.  root is disabled, the regular user account can switch to root at any time without having to re-enter their password.

Now to install OpenSSH.

apt-get install openssh-server

Until next time!