Operating System - Linux
1838240 Members
3380 Online
110125 Solutions
New Discussion

Re: KDE/GNOME login as LDAP user fails

 
SOLVED
Go to solution

KDE/GNOME login as LDAP user fails

I've got a strange problem using the KDE login as a LDAP user.
LDAP works OK for telnet, ftp etc. and after logging in using a console screen I can run startx and use KDE.
When I try to login with the graphical interface the screen goes blank for a second and returns with te login screen.
The LDAP server log shows that the authentication is OK but somehow KDE (or Gnome) doesn't start.
Any ideas?
Paul

Configuration:
RedHat 7.3 (i386) with all patches applied
Netscape v 6.01 LDAP server on HP9000/HP-UX 11i
If you must choose between two evils, pick the one you've never tried before
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: KDE/GNOME login as LDAP user fails

Just for grins, try dumping the environment after loggin in via telnet.

env > /tmp/env.telnet


Then do a graphical login, open a terminal session and do

env /tmp/env.graphical


Sounds like an environment variable needs to be set, but I could not begin to tell you which one.

I've set up my machines for LDAP but currently have no LDAP server configured.

Here is my environment.

PWD=/home/invest
REMOTEHOST=mail.juf.org
HOSTNAME=jerusalem.investmenttool.com
LESSOPEN=|/usr/bin/lesspipe.sh %s
USER=invest
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;0
1:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.b
tm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:
*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*
.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;3
5:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
MAIL=/var/spool/mail/invest
INPUTRC=/etc/inputrc
LANG=en_US
LOGNAME=invest
SHLVL=1
SHELL=/bin/bash
HISTSIZE=1000
TERM=vt100
HOME=/home/invest
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/contrib/bin:/home/invest/bin

Nothing jumps out at me here, but maybe in your working scenario you've got different environment variables set.


also think about looking at stty -a out put for obvious issues.

Here is mine as a reference

[invest@jerusalem invest]$ stty -a
speed 9600 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ;
eol2 = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt


Probably not much help, but having a template can't hurt right?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrew Cowan
Honored Contributor

Re: KDE/GNOME login as LDAP user fails

Hi Paul,

X-Windows usually won't start for two simple reasons:
1. The X-Screen configuration file points to the wrong driver/resolution etc.
2. Your system is having problems with its hostname.

It sounds to me as though your system has the wrong hostname, or that DNS is giving different answer, than the local system. Try examining your local hosts file and compare it with the results of "ping", "nslookup", etc.

Good luck,
Andrew

Re: KDE/GNOME login as LDAP user fails

The problem is not with running X Windows, but with logging in using the graphical login screen (xdm) as a LDAP user. Local users (in /etc/passwd) have no problems.

I've added some logging lines to several X startup files and they all seem to run OK. The logfile created by Xsession has the correct user/group, so the LDAP login succeeds.

When I use the "failsafe" option at login, I get a ~/.xsession-errors file with the message "cannot execute: no such file or directory" on the exec of "xterm". The program is installed and executable end even after adding the complete path to the program in the script (/usr/X11R6/bin/xterm) the errormessages keep coming.

Paul
If you must choose between two evils, pick the one you've never tried before

Re: KDE/GNOME login as LDAP user fails

I've found the cause and the solution.
Steven Protter was on the right track: it had to do with the SHELL environment variable.
With LDAP users this var gets set from the LDAP server (the "loginshell" attribute in the PosixUser tree) but this attribute wasn't configured in the LDAP directory!
If you don't use the xdm/kdm login (e.g using telnet or a console login) this var defaults to /bin/sh.
When using the xdm/kde login the var stays empty and as the Xsession script uses $SHELL to start scdipts none of these will run.
(The exec error message pointed at the missing shell and not the xterm program).
After putting /bin/sh as the loginshell in LDAP everything worked.

Paul
If you must choose between two evils, pick the one you've never tried before

Re: KDE/GNOME login as LDAP user fails

See previous post :-)
If you must choose between two evils, pick the one you've never tried before