Disabling the Ubuntu Login Screen (GDM) User Pick List

I’m used to typing in both my userid and my password when I log in to computers. I have never been a fan of the user pick lists that now seem to be common to many operating systems. I can see how they can be convenient for family machines at home, but the idea of advertising a list of potential accounts to compromise doesn’t sit well with me, so my preference is to disable the pick list and go back to the traditional typed userid & password form.

I run SAS on Ubuntu and recent Ubuntu versions (I forget which one it started with) now have a user pick list by default. The method for disabling the user pick list in Ubuntu is not that obvious and I find myself googling it every time I need it. A good article that provides both command line and GUI methods of disabling the user list can be found at Disabling the Login Screen User List in Ubuntu

The command line version is:

sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true

This can be followed by a quick restart of GDM:

restart gdm

.. and the user pick list is no more.

With Lucid (Ubuntu 10.04 LTS) there is still a redundant login button that needs to be clicked before you get to type your user id, but it’s still better than before. There has been a bug lodged for this behaviour (GDM without user list requires that you click Log In) and it appears to have been fixed so I look forward to seeing it when I next upgrade.

Installing VirtualBox Guest Additions in Ubuntu

What, you might be wondering, is a post about VirtualBox and Ubuntu doing on a blog that is primarily about SAS® platform administration and metadata?

The answer to that question is that VirtualBox and Ubuntu are both platforms where I run SAS for the purposes of development, testing and exploration/learning. So, whilst not specifically related to SAS platform administration itself, these topics are related to the administration of a platform that underpins a SAS installation I use, plus this blog is a place for me to put things so I don’t forget them later. I guess it’s also possible these posts might be of use to a small niche out there that might be trying to install SAS on Ubuntu in a VirtualBox environment for non-production purposes?

I’m a big fan of VirtualBox for desktop virtualization on Linux hosts and my primary desktop/notebook operating system has been Ubuntu for a few years. Whilst I have been a VMware Workstation user for many years, I find that VirtualBox works better for me on Linux desktop hosts at the moment. VMware is definitely my virtualization application of choice on Windows and Mac OS X desktops, but when it comes to running VMware Workstation on Linux I found there were just enough annoyances (you could use the term paper cut too) when using VMware on a Linux desktop that I was prompted to look elsewhere. VirtualBox ticked most of the boxes for me.

So, down the the subject of the post, I needed to install the VirtualBox Guest Additions in a brand new Ubuntu 10.04 Server guest installation and these were the steps I needed to take.

The installation of the guest additions requires a compilation/build environment which was not present on a fresh Ubuntu server installation.

sudo apt-get install build-essential linux-headers-`uname -r`

With the build tools now available I could load the Guest Additions software CD via the VirtualBox menu items Devices > Install Guest Additions…, mount the CD and then run the installer for 64-bit Linux platforms:

sudo mount /dev/sr0 /mnt/cdrom
cd /mnt/cdrom
sudo ./VBoxLinuxAdditions-amd64.run

Sudo with no password prompt

DISCLAIMER: This is definitely not recommended for any type of real environment that you rely on to be secure, but sometimes when you are setting up demo/sandpit/throwaway environments you want to be able to execute commands on Linux as root using sudo without getting prompted for your password. You could just work in a root shell all the time, but perhaps you still want to use sudo so you can use your normal account mostly and save yourself from potential accidents by only using sudo when you have to.

So, disclaimer out of the way, here’s how you can set yourself up as a no-password-sudoer (assuming you start out with sudo/root access to begin with):

Add your userid to an appropriate admin group:
sudo gpasswd -a youruserid youradmingroup

Edit the sudoers file:
sudo visudo

… to add an entry to allow your admin group to execute any command via sudo with no password requirement:
%youradmingroup ALL=NOPASSWD: ALL

BTW – visudo on Ubuntu defaults to the nano editor. If you prefer vi/vim you can switch default editor with:

sudo update-alternatives --config editor

.. and select the /usr/bin/vim.basic entry.

There’s more info about sudo on Ubuntu in the community documentation: RootSudo, Sudoers and RootSudoTimeout.

That’s it… sometimes handy but also dangerous … don’t say I didn’t warn you ;)