diff --git a/gnome-session/gsm-logout-dialog.c b/gnome-session/gsm-logout-dialog.c
index ca68714..f5e1242 100644
--- a/gnome-session/gsm-logout-dialog.c
+++ b/gnome-session/gsm-logout-dialog.c
@@ -41,6 +41,11 @@
 #define GSM_ICON_LOGOUT   "system-log-out"
 #define GSM_ICON_SHUTDOWN "system-shutdown"
 
+#define GSM_LOGOUT_CONF_DESKTOP_LOCKDOWN_SCHEMA "org.gnome.desktop.lockdown"
+#define GSM_LOGOUT_CONF_CAN_SWITCH "disable-user-switching"
+#define GSM_LOGOUT_CONF_CAN_LOGOUT "disable-log-out"
+
+
 typedef enum {
         GSM_DIALOG_LOGOUT_TYPE_LOGOUT,
         GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN
@@ -52,6 +57,7 @@ struct _GsmLogoutDialogPrivate
 
         UpClient            *up_client;
         GsmConsolekit       *consolekit;
+	GSettings           *lockdown_settings;
 
         int                  timeout;
         unsigned int         timeout_id;
@@ -145,6 +151,7 @@ gsm_logout_dialog_init (GsmLogoutDialog *logout_dialog)
         logout_dialog->priv->up_client = up_client_new ();
 
         logout_dialog->priv->consolekit = gsm_get_consolekit ();
+	logout_dialog->priv->lockdown_settings = g_settings_new (GSM_LOGOUT_CONF_DESKTOP_LOCKDOWN_SCHEMA);
 
         g_signal_connect (logout_dialog,
                           "destroy",
@@ -176,6 +183,11 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dialog,
                 logout_dialog->priv->consolekit = NULL;
         }
 
+	if (logout_dialog->priv->lockdown_settings) {
+		g_object_unref (logout_dialog->priv->lockdown_settings);
+		logout_dialog->priv->lockdown_settings = NULL;
+	}	
+
         current_dialog = NULL;
 }
 
@@ -198,10 +210,30 @@ gsm_logout_supports_switch_user (GsmLogoutDialog *logout_dialog)
 
         ret = gsm_consolekit_can_switch_user (logout_dialog->priv->consolekit);
 
+	if (g_settings_get_boolean (logout_dialog->priv->lockdown_settings, 
+				GSM_LOGOUT_CONF_CAN_SWITCH)) {
+		ret = FALSE
+	}
+
         return ret;
 }
 
 static gboolean
+gsm_logout_supports_logout (GsmLogoutDialog *logout_dialog)
+{
+	gboolean disable_logout;
+
+	disable_logout = g_settings_get_boolean (logout_dialog->priv->lockdown_settings,
+			GSM_LOGOUT_CONF_CAN_LOGOUT);
+
+	if (disable_logout) {
+		return  FALSE;
+	}
+
+	return TRUE;
+}
+
+static gboolean
 gsm_logout_supports_reboot (GsmLogoutDialog *logout_dialog)
 {
         gboolean ret;
@@ -369,9 +401,6 @@ gsm_get_dialog (GsmDialogLogoutType type,
         switch (type) {
         case GSM_DIALOG_LOGOUT_TYPE_LOGOUT:
                 icon_name    = GSM_ICON_LOGOUT;
-                primary_text = _("Log out of this system now?");
-
-                logout_dialog->priv->default_response = GSM_LOGOUT_RESPONSE_LOGOUT;
 
                 if (gsm_logout_supports_switch_user (logout_dialog)) {
                         gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
@@ -379,13 +408,29 @@ gsm_get_dialog (GsmDialogLogoutType type,
                                                GSM_LOGOUT_RESPONSE_SWITCH_USER);
                 }
 
-                gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
-                                       GTK_STOCK_CANCEL,
-                                       GTK_RESPONSE_CANCEL);
-
-                gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
-                                       _("_Log Out"),
-                                       GSM_LOGOUT_RESPONSE_LOGOUT);
+		if (gsm_logout_supports_logout (logout_dialog)) {
+	                gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
+	                                       _("_Log Out"),
+	                                       GSM_LOGOUT_RESPONSE_LOGOUT);
+		}
+
+		if (!gsm_logout_supports_switch_user (logout_dialog) 
+		     && !gsm_logout_supports_logout (logout_dialog)) {
+			primary_text = _("Insufficient permissions");
+			logout_dialog->priv->default_response = GTK_RESPONSE_OK;
+
+			gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
+						GTK_STOCK_OK,
+						GTK_RESPONSE_OK);
+
+		} else {
+			primary_text = _("Log out of this system now?");
+			logout_dialog->priv->default_response = GSM_LOGOUT_RESPONSE_LOGOUT;
+
+			gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
+						GTK_STOCK_CANCEL,
+						GTK_RESPONSE_CANCEL);
+		}
 
                 break;
         case GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN:
