Disable guest account in Ubuntu

For some reason, new Ubuntu releases show a guest account in the X login screen by default. That account can be disabled by editing (as root) /lightdm/lightdm.conf and adding the following line at the end of the file:

allow-guest=false

Then restart the session (still as root) with:

service lightdm restart