Summary: | (patch) Password & User Account: Changing name brings a password dialog yielding "chfn:Permission denied" | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Fabio Correa <facorread> |
Component: | kcm_useraccount | Assignee: | Frans Englich <frans.englich> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ach, andreas, andresbajotierra, arthur, arwald95, asturm, balcaen.john, betweensomeborders, blackst0ne.ru, danieljosecarvalho, davispuh, denis.koryavov, finex, god, johu, kde, kdesu-bugs-null, markotahal, martin.schnitkemper, mezin.alexander, ovit.debian, ozbekanil, rdieter, rjvbertin, samuel.a.ward, shubhadeepc, stupor_scurvy343, sudhir, vovochka13, wstephenson |
Priority: | NOR | ||
Version: | 4.12.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/00d66fec7aae9d50c46a68099a5189094cd1164e | Version Fixed In: | 4.14.0 |
Sentry Crash Report: | |||
Attachments: |
Disable Fullname editing
Backtrace of kcmshell4 kcm_useraccount when it's hangs |
Description
Fabio Correa
2008-01-22 17:45:51 UTC
Here using: Qt: 4.4.3 + qt-copy-patches-889120 KDE: 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101)) kdelibs svn rev. 906436 / kdebase svn rev. 906436 on ArchLinux x86_64 - Kernel 2.6.27.10 I can reproduce this bug Adding kdesu-bugs-null@kde.org to the CC as this seems to be related to KDESu Created attachment 35806 [details] Disable Fullname editing Patch fixes the problem for the case that _no_ fullname editing is allowed via chfn. When there's no default set (e.g., via kmail or mailody), then the default fullname is extracted fro passwd's gecos field. There is no check included to determine the chfn behaviour during runtime or buildtime. See also: https://bugs.launchpad.net/bugs/390396 *** Bug 233956 has been marked as a duplicate of this bug. *** It's KDE 4.6.0 but nobody cares about this bug :( Created attachment 60134 [details]
Backtrace of kcmshell4 kcm_useraccount when it's hangs
I can reproduce here on a KDE 4.6.3
when launching on command line i can read
$ kcmshell4 kcm_useraccount
kcmshell(1833)/kdesu (kdelibs) KDESu::PtyProcess::exec: [ /home/iurt/rpm/BUILD/kdelibs-4.6.3/kdesu/process.cpp : 293 ] Running "chfn"
and it's hanging
Attached is a bt (if it can help) of the loggi
Bug still present in KDE SC 4.7.3. Still present in KDE 4.8. Beta2 ping The patch is here: https://git.reviewboard.kde.org/r/104439/ *** Bug 298694 has been marked as a duplicate of this bug. *** *** Bug 301201 has been marked as a duplicate of this bug. *** It expects that chfn will ask for password, but chfn on my gentoo system never does this. If i enable setting full name in login.defs (CHFN_RESTRICT frwh), then it asks for password (when it's not needed), and just freeze. If CHFN_RESTRICT doesn't contain 'f' (by default it doesn't), then full name must be changed using something like sudo chfn -f "New Name" login. I think that changing full name in email settings and in passwd are different tasks. Why not change e-mail settings when chfn failed? I don't understand, why this commit is done: https://projects.kde.org/projects/kde/kde-baseapps/repository/revisions/8398bfba9d372f9c4fb3de597fbf7802e5f3a19c Maybe the right way to do this is try to execute chfn -f 1) without password 2) using kdesu And I think this must be done using separate button "Change system name" or something like this Updating version, still hanging in 4.10. *** Bug 317804 has been marked as a duplicate of this bug. *** Confirmed on a new install of 4.10.3. I'm glad that I am doing the setup there so the first bad impression on the user is avoided. Hello, as I commented in the Gentoo bug report about this issue (https://bugs.gentoo.org/show_bug.cgi?id=380899) I found a workaround. The workaround is as follows: 1. Edit /etc/login.defs and 1.1. Add 'f' to CHFN_RESTRICT if you didn't have it already, so now you should have: CHFN_RESTRICT frwh 1.2. Uncomment CHFN_AUTH (remove #). 2. Logout. 3. Login. 4. Fixed. Now you should be able to change your name from the System Settings. Okay, forget my previous comment. I got confused with the workaround. It seems that if the name contains a comma ',' it will change without issues. If it doesn't contain a comma it will crash. The bug still exist in 4.11.0-2 on Arch Linux. The bug still exists in 4.11.2 on Gentoo Linux. I confirm this bug on Arch-Linux and KDE-4.12.0, but I get not the "chfn:Permission denied"-message, systemsettings just hangs and does no longer respond. *** Bug 329762 has been marked as a duplicate of this bug. *** Confirmed in 4.12.1 in Gentoo. I was able to get my name in by making the /etc/login.defs changes. However to test it further I placed a comma at the end of my name and kcmshell4 kcm_useraccount worked as it should, but when I removed the comma it crashed and sent one of my CPU cores to 100%! Now I am unable to change it any further. Tried resetting login.defs and starting over, but it did not help. So don't put a comma in your name! I don't mind the comma so much as I do a runaway cpu core... Confirmed for KDE 4.11.3 on Linux Mint Debian. What's worse, System Settings doesn't appear to fetch the correct user information. I explain: - I created a new user via kuser, setting the desired full name - I copied over ~/.kde and ~/.config from my own account to the new account - I set the correct owner and group ship on the target - I removed/corrected the references to the source user Logging in as the new user, everything seems to be correct, and finger indeed shows the desired user information, including the full name. However, System Settings insists on showing the full name from the source account, and also the email address associated. Where does it get that information from? Apparently chfn is used to change the full name info in /etc/passwd when a change is requested, but the data is obtained from elsewhere? (In reply to comment #24) Not really a bug. You feed system settings the wrong information ;-) The information is read from ~/.kde/share/config/emaildefaults I can confirm that this bug still occurs on Arch Linux using KDE 4.13. I get no error message though, after applying the new name settings kcm_useraccount just freezes. I wasn't able to change user's name from settings using KDE 4.13.2 on Gentoo. It did asked for password and I entered it correctly, but still "Permission denied". But it worked fine using `sudo chfn -f Dāvis davis` actually no, chfn -f changed only in /etc/passwd but in KDE it still showed old one, but I was able to succesfully change after using this workaround
> The workaround is as follows:
> 1. Edit /etc/login.defs and
> 1.1. Add 'f' to CHFN_RESTRICT if you didn't have it already, so now you
> should have: CHFN_RESTRICT frwh
> 1.2. Uncomment CHFN_AUTH (remove #).
> 2. Logout.
> 3. Login.
> 4. Fixed. Now you should be able to change your name from the System
> Settings.
maybe it's a feature? but then should have better error message, not just "Permission denied" which doesn't explain much.
Can confirm the freeze issue and sending 1 processor core to >100% load after changing user name on Sabayon with KDE 4.13.2 The above mentioned workaround doesn't work for me. Could well be a feature, I find KDE 4 (still) is full of 'features' I would call a bug. :-( Git commit 00d66fec7aae9d50c46a68099a5189094cd1164e by Michael Palimaka, on behalf of Vishesh Handa. Committed on 27/06/2014 at 11:32. Pushed by palimaka into branch 'KDE/4.14'. UserAccount KCM: Change the name using the AccountManager Instead of calling chfn, parsing its output (which depends on the version of chfn which is present) and also additionally requires the password. This is also much more secure since we aren't storing the password in memory. REVIEW: 118974 FIXED-IN: 4.14.0 Conflicts: kdepasswd/kcm/chfnprocess.cpp kdepasswd/kcm/chfnprocess.h M +0 -1 kdepasswd/kcm/CMakeLists.txt D +0 -103 kdepasswd/kcm/chfnprocess.cpp D +0 -33 kdepasswd/kcm/chfnprocess.h M +21 -31 kdepasswd/kcm/main.cpp http://commits.kde.org/kde-baseapps/00d66fec7aae9d50c46a68099a5189094cd1164e |