LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   xdm authenticates but does not start Xfce (https://www.linuxquestions.org/questions/slackware-14/xdm-authenticates-but-does-not-start-xfce-4175437775/)

catkin 11-19-2012 05:36 AM

xdm authenticates but does not start Xfce
 
xdm authenticates but does not start Xfce. This is supported by: if an invalid combination of user name and password is entered, xdm clears the fields and displays "Login incorrect or forbidden by policy" and an entry appears in /var/log/secure.

This is a personal workstation; xdm behaves the same way for both root and the user.

The user's Xfce setup is OK. If the user logs on at a virtual terminal and runs startx, the Xfce desktop starts and functions normally. When the desktop session is locked, XScreenSaver accepts username and password normally and unlocks the screen.

AIUI, when xdm has authenticated, it runs /etc/X11/xinit/xinitrc. That is a symlink to /etc/X11/xinit/xinitrc.xfce, a /bin/sh script. I added debug logging to that script:
Code:

echo "$0: started" >> /tmp/xfce.startup.log
but the log file was not created.

Whatever is happening, it seems to be happening within xdm. rc.4 was modified, adding the -error option to xdm startup. Retesting and examining the log, I could find no clues.

rc.4 was further modified, adding debug=1. The man page warns, "To interpret these debugging messages, a copy of the source code for xdm is almost a necessity. No attempt has been made to rationalize or standardize the output". Fair warning; I cannot even confidently identify the point at which the attempted login has failed and xdm starts to re-initialise the login screen. In case it is meaningful to LQ members, here it is, starting after login and password are entered and Enter pressed
Code:

GreetDone: c, (password is 5 long)
FinishField #1: now DONE
Done dispatch :0
sessionArgument: <NULL>
Verify c ...
getspnam() failed: Success
verify succeeded
user environment:
DISPLAY=:0
HOME=/home/c
LOGNAME=c
USER=c
PATH=/bin:/usr/bin:/usr/bin:/usr/ucb
SHELL=/bin/bash
system environment:
DISPLAY=:0
HOME=/home/c
USER=c
LOGNAME=c
PATH=/etc:/bin:/usr/bin:/usr/bin:/usr/ucb
SHELL=/bin/sh
XAUTHORITY=/var/lib/xdm/authdir/authfiles/A:0-U8aPUF
WINDOWPATH=7
end of environments
Unsecure display :0
Greet connection closed
Greet loop finished
xdm info (pid 2389): sourcing /usr/lib64/X11/xdm/GiveConsole
attempting to execve() /usr/lib64/X11/xdm/GiveConsole
StartSession /usr/lib64/X11/xdm/Xsession: /usr/lib64/X11/xdm/Xsession ; DISPLAY=:0 HOME=/home/c LOGNAME=c USER=c PATH=/bin:/usr/bin:/usr/bin:/usr/ucb SHELL=/bin/bash
StartSession, fork succeeded 2410
Client Started
User netname: unix.1000@(none)
getsecretkey returns 0, key length 0
Could not set secret key.
SetUserAuthorization
XauLockAuth /home/c/.Xauthority
Lock is 0
opens succeeded /home/c/.Xauthority /home/c/.Xauthority-n
2 authorization protocols for :0
writeLocalAuth: :0 MIT-MAGIC-COOKIE-1
setAuthNumber :0
setAuthNumber: 0
DefineSelf
ConvertAddr returning -1 for family 17
ConvertAddr returning -1 for family 17
ConvertAddr returning 0 for family 2
Skipping localhost address
ConvertAddr returning 0 for family 2
writeAddr: writing and saving an entry
ConvertAddr returning 6 for family 10
Skipping IPv6 localhost address
ConvertAddr returning 6 for family 10
writeAddr: writing and saving an entry
DefineSelf done
writeAddr: writing and saving an entry
writeLocalAuth: :0 XDM-AUTHORIZATION-1
setAuthNumber :0
setAuthNumber: 0
DefineSelf
ConvertAddr returning -1 for family 17
ConvertAddr returning -1 for family 17
ConvertAddr returning 0 for family 2
Skipping localhost address
ConvertAddr returning 0 for family 2
writeAddr: writing and saving an entry
ConvertAddr returning 6 for family 10
Skipping IPv6 localhost address
ConvertAddr returning 6 for family 10
Skipping IPv6 XDM-AUTHORIZATION-1
DefineSelf done
writeAddr: writing and saving an entry
authorization file /home/c/.Xauthority successfully updated
done SetUserAuthorization
xdm info (pid 2410): executing session /usr/lib64/X11/xdm/Xsession
attempting to execve() /usr/lib64/X11/xdm/Xsession
Source reset program /usr/lib64/X11/xdm/TakeConsole
xdm info (pid 2389): sourcing /usr/lib64/X11/xdm/TakeConsole
attempting to execve() /usr/lib64/X11/xdm/TakeConsole
RemoveUserAuthorization
XauLockAuth /home/c/.Xauthority
Lock is 0
opens succeeded /home/c/.Xauthority /home/c/.Xauthority-n
writeLocalAuth: :0 XDM-AUTHORIZATION-1
setAuthNumber :0
setAuthNumber: 0
DefineSelf
ConvertAddr returning -1 for family 17
ConvertAddr returning -1 for family 17
ConvertAddr returning 0 for family 2
Skipping localhost address
ConvertAddr returning 0 for family 2
writeAddr: writing and saving an entry
ConvertAddr returning 6 for family 10
Skipping IPv6 localhost address
ConvertAddr returning 6 for family 10
Skipping IPv6 XDM-AUTHORIZATION-1
DefineSelf done
writeAddr: writing and saving an entry
writeLocalAuth: :0 MIT-MAGIC-COOKIE-1
setAuthNumber :0
setAuthNumber: 0
DefineSelf
ConvertAddr returning -1 for family 17
ConvertAddr returning -1 for family 17
ConvertAddr returning 0 for family 2
Skipping localhost address
ConvertAddr returning 0 for family 2
writeAddr: writing and saving an entry
ConvertAddr returning 6 for family 10
Skipping IPv6 localhost address
ConvertAddr returning 6 for family 10
writeAddr: writing and saving an entry
DefineSelf done
writeAddr: writing and saving an entry
authorization file /home/c/.Xauthority successfully updated
Display :0 exiting with status 0
Manager wait returns pid: 2389 sig 0 core 0 code 0
Display exited with OBEYSESS_DISPLAY
StartDisplay :0
xdm info (pid 2122): Starting X server on :0
DisplayManager._0.serverAttempts/DisplayManager._0.ServerAttempts value 1
DisplayManager._0.openDelay/DisplayManager._0.OpenDelay value 15
DisplayManager._0.openRepeat/DisplayManager._0.OpenRepeat value 5
DisplayManager._0.openTimeout/DisplayManager._0.OpenTimeout value 120
DisplayManager._0.startAttempts/DisplayManager._0.StartAttempts value 4
DisplayManager._0.reservAttempts/DisplayManager._0.ReservAttempts value 2
DisplayManager._0.pingInterval/DisplayManager._0.PingInterval value 5
DisplayManager._0.pingTimeout/DisplayManager._0.PingTimeout value 5
DisplayManager._0.terminateServer/DisplayManager._0.TerminateServer value false
DisplayManager._0.grabServer/DisplayManager._0.GrabServer value false
DisplayManager._0.grabTimeout/DisplayManager._0.GrabTimeout value 3
DisplayManager._0.resetSignal/DisplayManager._0.Signal value 1
DisplayManager._0.termSignal/DisplayManager._0.Signal value 15
DisplayManager._0.resetForAuth/DisplayManager._0.ResetForAuth value false
DisplayManager._0.authorize/DisplayManager._0.Authorize value  true
DisplayManager._0.authComplain/DisplayManager._0.AuthComplain value  true
DisplayManager._0.authName/DisplayManager._0.AuthName value XDM-AUTHORIZATION-1 MIT-MAGIC-COOKIE-1
DisplayManager._0.authFile/DisplayManager._0.AuthFile value
SetLocalAuthorization :0, auth XDM-AUTHORIZATION-1
GenerateAuthorization XDM-AUTHORIZATION-1
Local server auth 5c 56 e0 21 bf 8c 95 24 00 ad e3 c9 97 bb 39 b6
Got 0x198e640 (19 XDM-AUTHORIZATION-1)  5c 56 e0 21 bf 8c 95 24 00 ad e3 c9 97 bb 39 b6
GenerateAuthorization MIT-MAGIC-COOKIE-1
Got 0x198e5b0 (18 MIT-MAGIC-COOKIE-1)  41 8a 95 73 26 12 1c 4e 60 d1 78 86 3b 66 22 b9
File: /var/lib/xdm/authdir/authfiles/A:0-U8aPUF auth: 0x198e590
pid: 2424
WaitForSomething
signals blocked
DisplayManager._0.resources/DisplayManager._0.Resources value  /usr/lib64/X11/xdm/Xresources
DisplayManager._0.xrdb/DisplayManager._0.Xrdb value /usr/bin/xrdb
DisplayManager._0.setup/DisplayManager._0.Setup value  /usr/lib64/X11/xdm/Xsetup_0
DisplayManager._0.startup/DisplayManager._0.Startup value  /usr/lib64/X11/xdm/GiveConsole
DisplayManager._0.reset/DisplayManager._0.Reset value  /usr/lib64/X11/xdm/TakeConsole
DisplayManager._0.session/DisplayManager._0.Session value  /usr/lib64/X11/xdm/Xsession
DisplayManager._0.userPath/DisplayManager._0.Path value /bin:/usr/bin:/usr/bin:/usr/ucb
DisplayManager._0.systemPath/DisplayManager._0.Path value /etc:/bin:/usr/bin:/usr/bin:/usr/ucb
DisplayManager._0.systemShell/DisplayManager._0.Shell value /bin/sh
DisplayManager._0.failsafeClient/DisplayManager._0.FailsafeClient value /usr/bin/xterm
DisplayManager._0.userAuthDir/DisplayManager._0.UserAuthDir value /tmp
DisplayManager._0.chooser/DisplayManager._0.Chooser value  /usr/lib64/X11/xdm/chooser
Before XOpenDisplay(:0)
1 XSELINUXs still allocated at reset
SCREEN: 0 objects of 264 bytes = 0 total bytes 0 private allocs
DEVICE: 0 objects of 96 bytes = 0 total bytes 0 private allocs
CLIENT: 0 objects of 184 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 48 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 0 objects of 72 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
TOTAL: 1 objects, 16 bytes, 0 allocs
1 PIXMAPs still allocated at reset
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 0 objects of 72 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
TOTAL: 1 objects, 16 bytes, 0 allocs
resize called 1280 1024
display manager caught SIGUSR1
WaitForSomething
signals blocked
After XOpenDisplay(:0)
ManageSession :0
Loading resource file: /usr/lib64/X11/xdm/Xresources
attempting to execve() /usr/bin/xrdb
ManageSession: loading greeter library /usr/lib64/X11/xdm/libXdmGreet.so
greet :0
SecureDisplay :0
Before XGrabServer :0
XGrabKeyboard succeeded :0
pseudoReset screen 0
before XSync
pseudoReset done
done secure :0
SetPrompt(1, <NULL>, LOGIN_PROMPT_ECHO_OFF(2))
SetPrompt(0, <NULL>, LOGIN_PROMPT_ECHO_ON(1))
xdm info (pid 2424): sourcing /usr/lib64/X11/xdm/Xsetup_0
attempting to execve() /usr/lib64/X11/xdm/Xsetup_0
dispatching :0
RedrawFail('Login incorrect or forbidden by policy', 0)

and, for comparison, here's how it looks when xdm is killed and it is re-started via inittab
Code:

Starting up X11 session manager (rc.4 running) ...
DisplayManager.errorLogFile/DisplayManager.ErrorLogFile value  /tmp/xdm.error.log
DisplayManager.daemonMode/DisplayManager.DaemonMode value  false
DisplayManager.pidFile/DisplayManager.PidFile value  /var/run/xdm.pid
DisplayManager.lockPidFile/DisplayManager.LockPidFile value true
DisplayManager.authDir/DisplayManager.authDir value  /var/lib/xdm
DisplayManager.autoRescan/DisplayManager.AutoRescan value true
DisplayManager.removeDomainname/DisplayManager.RemoveDomainname value true
DisplayManager.keyFile/DisplayManager.KeyFile value  /usr/lib64/X11/xdm/xdm-keys
DisplayManager.accessFile/DisplayManager.AccessFile value  /usr/lib64/X11/xdm/Xaccess
DisplayManager.exportList/DisplayManager.ExportList value
DisplayManager.randomFile/DisplayManager.RandomFile value /dev/mem
DisplayManager.prngdSocket/DisplayManager.PrngdSocket value /tmp/entropy
DisplayManager.prngdPort/DisplayManager.PrngdPort value 0
DisplayManager.randomDevice/DisplayManager.RandomDevice value /dev/urandom
DisplayManager.greeterLib/DisplayManager.GreeterLib value /usr/lib64/X11/xdm/libXdmGreet.so
DisplayManager.choiceTimeout/DisplayManager.ChoiceTimeout value 15
DisplayManager.sourceAddress/DisplayManager.SourceAddress value false
DisplayManager.willing/DisplayManager.Willing value  su nobody -s /bin/sh -c /usr/lib64/X11/xdm/Xwilling
storing process ID in /var/run/xdm.pid
xdm info (pid 2443): Starting
Found new display:  :0  local /usr/bin/X :0
StartDisplay :0
xdm info (pid 2443): Starting X server on :0
DisplayManager._0.serverAttempts/DisplayManager._0.ServerAttempts value 1
DisplayManager._0.openDelay/DisplayManager._0.OpenDelay value 15
DisplayManager._0.openRepeat/DisplayManager._0.OpenRepeat value 5
DisplayManager._0.openTimeout/DisplayManager._0.OpenTimeout value 120
DisplayManager._0.startAttempts/DisplayManager._0.StartAttempts value 4
DisplayManager._0.reservAttempts/DisplayManager._0.ReservAttempts value 2
DisplayManager._0.pingInterval/DisplayManager._0.PingInterval value 5
DisplayManager._0.pingTimeout/DisplayManager._0.PingTimeout value 5
DisplayManager._0.terminateServer/DisplayManager._0.TerminateServer value false
DisplayManager._0.grabServer/DisplayManager._0.GrabServer value false
DisplayManager._0.grabTimeout/DisplayManager._0.GrabTimeout value 3
DisplayManager._0.resetSignal/DisplayManager._0.Signal value 1
DisplayManager._0.termSignal/DisplayManager._0.Signal value 15
DisplayManager._0.resetForAuth/DisplayManager._0.ResetForAuth value false
DisplayManager._0.authorize/DisplayManager._0.Authorize value  true
DisplayManager._0.authComplain/DisplayManager._0.AuthComplain value  true
DisplayManager._0.authName/DisplayManager._0.AuthName value XDM-AUTHORIZATION-1 MIT-MAGIC-COOKIE-1
DisplayManager._0.authFile/DisplayManager._0.AuthFile value
SetLocalAuthorization :0, auth XDM-AUTHORIZATION-1
GenerateAuthorization XDM-AUTHORIZATION-1
Local server auth b8 76 33 c3 b9 95 49 bc 00 5b 58 a5 62 38 b7 a3
Got 0x14365b0 (19 XDM-AUTHORIZATION-1)  b8 76 33 c3 b9 95 49 bc 00 5b 58 a5 62 38 b7 a3
GenerateAuthorization MIT-MAGIC-COOKIE-1
Got 0x1436640 (18 MIT-MAGIC-COOKIE-1)  2e 78 6f bd 25 76 7a 61 b2 00 4c ce 9a a8 94 35
File: /var/lib/xdm/authdir/authfiles/A:0-B8HUZe auth: 0x1436590
StartServer for :0
Server Started 2445
'/usr/bin/X' ':0' '-auth' '/var/lib/xdm/authdir/authfiles/A:0-B8HUZe'

X.Org X Server 1.12.3
Release Date: 2012-07-09
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.0 Slackware Linux Project
Current Operating System: Linux CW8 3.2.29 #2 SMP Mon Sep 17 14:19:22 CDT 2012 x86_64
Kernel command line: root=/dev/sda14 vga=791 vt.default_utf8=1 ro
Build Date: 23 August 2012  02:03:27PM
 
Current version of pixman: 0.26.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 19 13:59:01 2012
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
resize called 1280 1024
display manager paused til SIGUSR1
pid: 2453
startup successful; entering main loop
WaitForSomething
signals blocked
DisplayManager._0.resources/DisplayManager._0.Resources value  /usr/lib64/X11/xdm/Xresources
DisplayManager._0.xrdb/DisplayManager._0.Xrdb value /usr/bin/xrdb
DisplayManager._0.setup/DisplayManager._0.Setup value  /usr/lib64/X11/xdm/Xsetup_0
DisplayManager._0.startup/DisplayManager._0.Startup value  /usr/lib64/X11/xdm/GiveConsole
DisplayManager._0.reset/DisplayManager._0.Reset value  /usr/lib64/X11/xdm/TakeConsole
DisplayManager._0.session/DisplayManager._0.Session value  /usr/lib64/X11/xdm/Xsession
DisplayManager._0.userPath/DisplayManager._0.Path value /bin:/usr/bin:/usr/bin:/usr/ucb
DisplayManager._0.systemPath/DisplayManager._0.Path value /etc:/bin:/usr/bin:/usr/bin:/usr/ucb
DisplayManager._0.systemShell/DisplayManager._0.Shell value /bin/sh
DisplayManager._0.failsafeClient/DisplayManager._0.FailsafeClient value /usr/bin/xterm
DisplayManager._0.userAuthDir/DisplayManager._0.UserAuthDir value /tmp
DisplayManager._0.chooser/DisplayManager._0.Chooser value  /usr/lib64/X11/xdm/chooser
Before XOpenDisplay(:0)
After XOpenDisplay(:0)
ManageSession :0
Loading resource file: /usr/lib64/X11/xdm/Xresources
attempting to execve() /usr/bin/xrdb
ManageSession: loading greeter library /usr/lib64/X11/xdm/libXdmGreet.so
greet :0
SecureDisplay :0
Before XGrabServer :0
XGrabKeyboard succeeded :0
pseudoReset screen 0
before XSync
pseudoReset done
done secure :0
SetPrompt(1, <NULL>, LOGIN_PROMPT_ECHO_OFF(2))
SetPrompt(0, <NULL>, LOGIN_PROMPT_ECHO_ON(1))
xdm info (pid 2453): sourcing /usr/lib64/X11/xdm/Xsetup_0
attempting to execve() /usr/lib64/X11/xdm/Xsetup_0
dispatching :0
RedrawFail('Login incorrect or forbidden by policy', 0)


ChrisAbela 11-19-2012 06:28 AM

xdm looks for $HOME/.xsession. I also use XFCE and it is a copy of $HOME/.xinitrc but it should have executable permission. Running xwmconfig should do this automatically.

ChrisAbela 11-19-2012 06:30 AM

Are you on Slackware 14.0? If I remember well, on Slackware 13.37, the xdm choice of Window Manager depended on the xwmconfig choice for root, but I might be wrong.

catkin 11-19-2012 08:08 AM

Thanks ChrisAbela :)

Yes, this is Slackware64 14.0. It is a fresh a installation on a computer that was previously running Slackware64 13.37. During installation Xfce was chosen as the desktop. Hence /etc/X11/xinit/xinitrc being a symlink to /etc/X11/xinit/xinitrc.xfce.

I don't have access to the computer at the moment but the installation log says the user's .xsession was not copied from the 13,37 installation. Regards X, only .Xmodmap, .Xresources and .xscreensaver were copied -- no .xsession or .xinitrc. But it is unlikely that the problem is triggered by such files because the problem occurs when root tries to login at the xdm screen and no such files were copied from 13.37 for root.

I can explore xwmconfig tomorrow.

steelneck 11-20-2012 12:49 PM

Since you are talking about a personal workstation, do you really need a login manager?

I have replaced it with a very simple script in my .profile that starts X depending which runlevel the box was started in, and i have made the 5th runlevel in /etc/initab to be the same as runlevel 3. So if i start init 3 i just get a normal console after login, but if i start init 5 startx is issued automatically after login.

Code:

RLVL=$(who -r | awk '{print $2}')
if [ $RLVL = 5 ]; then
  if [ ! -e /tmp/.X0-lock ]; then
    startx
    exit
  fi
fi

I use Icewm that is started from my .xinitrc and by that simple script i do not need any login manager at all, if you do not need any fancy things a login manager provides, i think you can do the same using xfce.

catkin 11-22-2012 04:22 AM

Thanks steelneck, that's neat :)

I fixed it by re-installing so am marking this thread SOLVED although a solution was not identified. In case anyone wants me to try some analysis, I will keep a backup of the defective system for a while.


All times are GMT -5. The time now is 06:26 PM.