I have an open PAM-related question right now, so I can say from experience that modifying any PAM modules can quickly get very specific to the version of Ubuntu you are working with. What works for Precise, may not always work for Quantal, etc.
That said, the answer to your question probably does not require any changes to PAM modules. In fact, you almost have it.
Add this line to the bottom of /etc/lightdm/lightdm.conf
greeter-allow-guest=false
My lightdm.conf
looks like this:
[SeatDefaults]<br>
greeter-session=unity-greeter<br>
user-session=ubuntu<br>
greeter-allow-guest=false<br>
Now restart your machine.
On 12.10, I tested that this removes Guest from the user menu, but leaves it as a manual option once logged in on another account.
Pretty sure this will work for you on 12.04 as well.
Best Answer
Updated: 2016-Aug
For Ubuntu 16.04 LTS (15.10 or later)
Adapted from: LightDM Ubuntu Wiki - Configuration
/usr/share/lightdm/
are not intended to be user editable. Instead users should use:/etc/lightdm/
[Seat:*]
instead of[SeatDefaults]
Just run this (once) at terminal:
To undo (restore Guest option), remove the file created:
For Ubuntu 14.04 LTS (up to 15.04)
Adapted from: Ubuntu Forums - lightdm config files location in 14.04
Just run this (once) at terminal:
You will no longer have 'Guest' as login option, on your next login.
To undo (restore Guest option), remove the file created:
For Ubuntu 12.04 LTS (up to 13.10)
Simplest method.
Just run this (once) at terminal:
You will no longer have 'Guest' as login option, on your next login.
This simply appends
allow-guest=false
to/etc/lightdm/lightdm.conf
.Should work from 11.10 onwards (since these use LightDM as well).
To undo (restore Guest option):