Bug 158196 - kdm does not create DataDir if it is missing
Summary: kdm does not create DataDir if it is missing
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-21 22:47 UTC by Dan
Modified: 2010-02-28 21:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2008-02-21 22:47:45 UTC
Version:            (using KDE 4.0.1)
Installed from:    Compiled From Sources
Compiler:          4.1.2 
OS:                Linux

Checking the option to remember the last username in "systemsettings -> login manager" does not have any effect. I've double-checked kdmrc and the following line is inlcuded:
"PreselectUser=Previous" 

After Reboot/Logoff KDM is supposed to preselect the previous user, but it simply doesn't. This occurs in standard and themed mode. I remember this to work in KDE3.
Comment 1 Oswald Buddenhagen 2008-02-23 11:51:30 UTC
*** This bug has been marked as a duplicate of 144043 ***
Comment 2 Dan 2008-02-24 12:31:11 UTC
How is this a duplicate of 144043? 144043 covers KDE 3.x and the reporter stated that
> It works like expected when logging in locally
. But here it does _not_ work like expected when logging in locally. I can confirm that this worked on the same machine with the same setup in KDE 3.x! This is more of a KDE4-issue than a duplicate of the KDE3.x-bug, which covers different aspects of kdm-problems.
Comment 3 Oswald Buddenhagen 2008-02-24 12:34:07 UTC
would you bet?
in which section of kdmrc is the PreselectUser=Previous?
Comment 4 Dan 2008-02-26 18:38:23 UTC
This is the section:

[X-:*-Greeter]
AllowClose=false
DefaultUser=daniel
FocusPasswd=true
LoginMode=DefaultLocal
PreselectUser=Previous

My entire kdmrc can be found here:
http://www.tu-chemnitz.de/~klada/misc/kdmrc

Again: I just have a local machine with local login through pam_unix/shadow.
Comment 5 Oswald Buddenhagen 2008-02-26 22:32:49 UTC
hmm. so the usual drill: logs with -debug 7. details can be found in the kdm README.
Comment 7 Oswald Buddenhagen 2008-03-27 19:40:42 UTC
i can't find anything indicative of the problem in the log ...
please have a look (ls -l and cat) at /var/lib/kdm/kdmsts shortly after a successful login. does it seem to be updated? with the right content?
Comment 8 Dan 2008-04-19 17:23:23 UTC
On my system there is no kdmsts file. I am using Gentoo Linux an even in /usr/kde/4.0 I cannot find this file.
Comment 9 Oswald Buddenhagen 2008-04-19 18:14:25 UTC
this kinda sound like a problem. :)
does the directory exist? can you successfully create files in it?

nb: i wonder how the "Wallpaper" option got into your kdmrc ...
Comment 10 Dan 2008-04-19 19:33:06 UTC
I've created the dir manually:
mkdir -p /var/lib/kdm/
touch /var/lib/kdm/kdmsts
chmod -R a+rwx /var/lib/kdm/

And now it works. So I wonder why kdm did not create the dir automatically... My access rights for /var/lib are: "drwxr-xr-x 19 root root" an kdm is started as root.
Comment 11 Dan 2008-04-19 19:38:09 UTC
OK, I figured out that
"mkdir -p /var/lib/kdm/"
is sufficient, then everything works correctly. Why don't you just let kdm issue this command automatically (if the dir does not exist)?
Comment 12 Oswald Buddenhagen 2008-04-19 19:43:18 UTC
so this is not a dupe ...
Comment 13 Oswald Buddenhagen 2008-04-19 20:05:54 UTC
... but an installation error.

kdm does not do this, because the genkdmconf program - which is executed during installation - takes care of that. you probably installed as a regular user into a directory which requires no special permissions. this made some necessary initializations of system files fail.

i'm wondering what should change:
- kdm could just complain if it is missing
- kdm could silently create that dir. this is ugly, as it potentially hides further problems. anyway,
  - kdm could do it itself
  - kconfig could be changed to create missing dirs. that's really ugly.
Comment 14 Dan 2008-04-20 11:14:19 UTC
Well, I guess if kdm would display a warning in the log files it would be sufficient as well... Then the user could create the dir by hand or check his/her installation.

> you probably installed as a regular user into a directory which requires no special permissions
Nope, I installed as root from the Gentoo ebuilds. I'll report the problem to the Gentoo people.
Comment 15 Dan 2008-10-17 19:28:07 UTC
Did not observe this problem in KDE 4.1.2.
Comment 16 Oswald Buddenhagen 2008-10-17 20:06:46 UTC
this kind of makes no sense ...
Comment 17 Oswald Buddenhagen 2008-11-18 19:10:37 UTC
nothing was changed so far.
kdm should complain somehow.
Comment 18 Oswald Buddenhagen 2010-02-28 21:40:40 UTC
SVN commit 1097273 by ossi:

make a note of inaccessible DataDir in the log

make no attempt at fixing it or being more visible. such a low-level
installation failure can reasonably require low-level debugging ...

BUG: 158196

 M  +3 -0      kdmconfig.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1097273