Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two machines both running CentOS 5.6 64bit. On the LDAP Machine it has a DHCP, BIND and OpenLDAP Server. LDAP is correctly configured and users can authenticate against it.

Using root I configure machine 2 to use LDAP for authentication and when trying to log in it successfully authenticates against a saved user on the LDAP Server but produces the following errors and then throws me back to the login screen. I can still sign in as root and use the machine as normal. The syslog doesn't show any errors and I disabled SELinux to see if it was interfering.

The error;

Your session only lasted less than 10 seconds. If you have not lgoged out yourself, this could mean that there is some installation problem or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix this problem.

There is then a tickbox to view the contents of ~/.xsessions-errors which contains;

/etc/gdm/PreSession/Default: Registering your session with utmp
/etc/gdm/PreSession/Default: running: /usr/bin/sessreg -a -u /var/run/utmp -x "/var/gdm:0:Xservers" -h "" -l ":0" "admin"
        localuser:admin being added to access control list
    No profile for user 'admin' found
    /bin/sh: /usr/bin/dbus-launch --exit-with-session /etc/X11/Xinit/Xclients: No such file or directory
    /bin/sh: line 0: exec: /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients: cannot execute: No such file or directory

Apologies if someone notices something isn't spelt quite right or doesn't sound right, the system never actually creates or saves this file so I have had to type it across from the screen.

Through the authentication panel in CentOS on the client I have set it to create the users home directory on login. The user is being correctly authenticated and the /home/admin folder has been created but this error would suggest it has not? The client is a new install on an 80gb hard drive so there is well over 80% of the drive still available.

Thanks for any suggestions or pointers.

share|improve this question
up vote 0 down vote accepted

Ok. So the error was not defining /bin/bash as the loginShell attribute for the user on the LDAP server. Because of the permissions on the system and bash being used the default shell on the system it was having errors to try and create the default files required for the x11 system. Adding the /bin/bash loginShell atribute to all users fixed everything

share|improve this answer

"Adding the /bin/bash loginShell atribute to all users fixed everything"

i know this is old but if anyone could explain what he/she did, exactly to fix it i would be very grateful

share|improve this answer
You shouldn't post questions in the answer section. – Drew Khoury Jan 24 '14 at 8:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.