Bug 127561 - Yast2 user account tool doesn't change the directory's name
Summary: Yast2 user account tool doesn't change the directory's name
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: i686 All
: P5 - None : Normal
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 14:22 UTC by Thomas Meindl
Modified: 2005-10-17 08:49 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
yast2 log files (278.96 KB, application/x-gunzip)
2005-10-11 15:00 UTC, Thomas Meindl
Details
/etc/passwd plain text (1.12 KB, application/octet-stream)
2005-10-11 15:02 UTC, Thomas Meindl
Details
patch for /usr/share/YaST2/include/users/dialogs.ycp (400 bytes, patch)
2005-10-13 13:09 UTC, Jiří Suchomel
Details | Diff
patch for /usr/share/YaST2/modules/Users.pm (1.59 KB, patch)
2005-10-13 14:22 UTC, Jiří Suchomel
Details | Diff
yast2 log files (617.66 KB, application/x-gunzip)
2005-10-14 08:32 UTC, Thomas Meindl
Details
/etc/sysconfig/displaymanger (2.24 KB, text/plain)
2005-10-14 08:33 UTC, Thomas Meindl
Details
Output of SuSEconfig and kdmrc files (8.66 KB, application/x-gzip)
2005-10-14 10:59 UTC, Thomas Meindl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Meindl 2005-10-11 14:22:22 UTC
I tried to change the name of the user account from 'user1' to 'user' via the
YaST2 module. I left the field 'name of the user' empty (just to mention it) and
Yast asked if I wanted to change the current account directory to 'user'. By
clicking on 'yes' and restarting the system, kdm says :

kdm :0[7242] : Cannot chdir to user's home /home/user :No such file or
directory, using /

Looking as root for the issue, I saw that the directory had still its old name
(/home/user1). I had also some issue with the password and the auto-login of
kdm. With the first try kdm mentioned that the password of 'user1' was wrong,
but the account was - meanwhile - named 'user'. I solved this by reentering the
password in the Yast tool.
So I think there's something wrong with the changing of the directory names and
the updating about the name of the user account.
Comment 1 Michael Gross 2005-10-11 14:40:40 UTC
Please provide:
- yast-logs
- /etc/passwd

Thanks.
Comment 2 Thomas Meindl 2005-10-11 15:00:01 UTC
Created attachment 53646 [details]
yast2 log files

Still working on it ;) .. here it is ...
Comment 3 Thomas Meindl 2005-10-11 15:02:41 UTC
Created attachment 53647 [details]
/etc/passwd plain text

Contents of the file should be correct by now.
Comment 4 Thomas Meindl 2005-10-11 16:15:00 UTC
The non-existend 'user1' is also activated in the auto-login feature, therefore
KDM says there is a major error...
Comment 5 Jiří Suchomel 2005-10-13 13:09:14 UTC
Created attachment 53939 [details]
patch for /usr/share/YaST2/include/users/dialogs.ycp

This patch should fix moving the directory.
Comment 6 Jiří Suchomel 2005-10-13 13:10:02 UTC
Could you please apply the patch to your
/usr/share/YaST2/include/users/dialogs.ycp and test renaming user again?
Comment 7 Thomas Meindl 2005-10-13 13:16:16 UTC
Sure - going to test it in a couple of minutes.
Comment 8 Thomas Meindl 2005-10-13 14:04:21 UTC
Renaming the user-account works fine now.
But there's still the issue with the kdm auto-login: I renamed the account from
'olduser' to 'newuser' (still being logged in as olduser - therefore programs
like kat, kget, krpmbuilder, firefox and thunderbird went really mad - but hey,
life is hard ;) ) and rebooted. As kdm started up, it mentioned that some sort
of error occured and console 10 showed:

kdm:0:[5778]: getpwnam(olduser) failed



Comment 9 Jiří Suchomel 2005-10-13 14:22:04 UTC
Created attachment 53943 [details]
patch for /usr/share/YaST2/modules/Users.pm

This new patch should fix both problems.
Comment 10 Jiří Suchomel 2005-10-14 06:49:35 UTC
Could you please test the new patch for /usr/share/YaST2/modules/Users.pm? (It
works for me, I just want to see also the confirmation from the bug founder:-))
Thanks.
Comment 11 Thomas Meindl 2005-10-14 07:49:38 UTC
I've patched the Users.pm file and set the dialogs.ycp to its original state.
Renaming works fine with the new patch, but for some reason the KDM problem
persists - I still get the getpwnam() message :( and the login dialogue also
remembers the old name. 
Comment 12 Jiří Suchomel 2005-10-14 07:58:21 UTC
Hmm, that's strange. Could you attach your /etc/sysconfig/displaymanager file?
And maybe also current yast2 logfiles?
Comment 13 Thomas Meindl 2005-10-14 08:32:45 UTC
Created attachment 54017 [details]
yast2 log files
Comment 14 Thomas Meindl 2005-10-14 08:33:28 UTC
Created attachment 54019 [details]
/etc/sysconfig/displaymanger
Comment 15 Thomas Meindl 2005-10-14 08:35:57 UTC
Here they are. Name of the account 'user' was changed to 'user10' - in
displaymanger all seems to fine - very strange indeed.
Comment 16 Jiří Suchomel 2005-10-14 08:57:55 UTC
But when you reboot, autologin works fine, doesn't it?

Now when I read it better, the main problem is probably that you rename the user
which is logged in - no wonder it behaves strange (maybe I should forbid it at
all in yast2-users). Does everything work correctly if you rename the user (set
for autologin), which is not logged in?
Comment 17 Thomas Meindl 2005-10-14 09:18:30 UTC
>> But when you reboot, autologin works fine, doesn't it?
No, it doesn't. It doesn't matter whether I reboot or init3-init5 - kdm always
complains.

>> Does everything work correctly if you rename the user (set
for autologin), which is not logged in?
I thought along the same line, but even if I rename as root (with noone else
logged in), the next startup kdm prints it's message.
Comment 18 Jiří Suchomel 2005-10-14 10:02:12 UTC
Hmm, and does it work after you run SuSEconfig?
Comment 19 Thomas Meindl 2005-10-14 10:58:42 UTC
No, SuSEconfig says it can't alter kdmrc (I'll attach the output, and the kdmrc
files SuSEconfig mentions). As you can see, in the original kdmrc , there is the
old 'user10' instead of the correct 'usernew'.
Comment 20 Thomas Meindl 2005-10-14 10:59:26 UTC
Created attachment 54070 [details]
Output of SuSEconfig and kdmrc files
Comment 21 Jiří Suchomel 2005-10-14 11:03:27 UTC
Looks like some kdm issue - Stephan?
Comment 22 Stephan Kulow 2005-10-14 11:53:27 UTC
If you once edited kdmrc manually (or by kcontrol means), SuSEconfig won't 
touch it anymore. Nothing more to say - and SuSEconfig tells you it did not. 
You need to decide on yourself which version you prefer, the changed one or 
the suseconfig generated one 
Comment 23 Jiří Suchomel 2005-10-14 12:41:58 UTC
OK, so I assume yast2-users bug is fixed while the rest stands for user's KDM
configuration.
Comment 24 Thomas Meindl 2005-10-14 17:16:11 UTC
>> If you once edited kdmrc manually (or by kcontrol means), SuSEconfig won't 
touch it anymore. 

So you mean, you can only use Yast OR kcontrol to manage the accounts, else
you'll encounter this behaviour. If it works that way, I personally thing that
this should be fixed in some way, but, anyway thank you a lot.
Comment 25 Jiří Suchomel 2005-10-17 08:49:59 UTC
fixed in yast2-users-2.13.4 (will be in SL10.1 including some of its next Alpha releases).