"About Me" in System Settings throws an error when changing details

Bug #390396 reported by Kyle Evans
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
Medium
One Hundred Papercuts
Fix Released
Undecided
Achim Bohnet
kdebase (Ubuntu)
Fix Released
Low
Alessandro Ghersi

Bug Description

This affects Kubuntu in System Settings -> About Me. Changing and saving your name/email/ etc. makes the system ask for your password. After entering in your password the follow error box pops up saying:

"An error occurred and your password has probably not been changed. The error message was: chfn: Permission denied."

However, the error seems to not have any affect. The settings are saved as expected regardless of the error.

There are perhaps three papercuts here: 1 being that a user must type in his/her password when changing information, 2 that an error message popped up, 3 that the error message has nothing to do with any of the settings that the user actually changed.

Revision history for this message
In , Fabio Correa (facorread) wrote :

Version: (using KDE 4.0.0)
Installed from: Gentoo Packages
Compiler: x86_64-pc-linux-gnu-gcc 4.1.1
OS: Linux

Well, System Settings->About Me->Password & User Account is a frontend to chfn and passwd. Chfn does not allow to change the Full Name field of a regular user, except when run as root.

When you change the "Name" field, and click Apply, a new dialog prompts for the user password. When correctly entered, a message box appears showing "chfn:Permission denied". It does not matter if chfn is suid root.

Given I don't know what is the reason to prompt for a password in the first place, and then running a surely failing chfn command, it would be better to do one of the three following things:

o To disable the "Name" text box,
o To use a label instead of a text box for the "Name" field
o To not use chfn for the change of name, but just update the name field in the KDE config.

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

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

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

Adding <email address hidden> to the CC as this seems to be related to KDESu

Kyle Evans (kyledevans)
tags: added: kde
tags: added: hundredpaperkuts
Revision history for this message
Rich Johnson (nixternal) wrote :

Using Karmic with 4.3 Beta 2. I am unable to reproduce this issue.

I go to System Settings, About Me. I have changed my email address and pressed apply. I did not get a popup asking for a password. So then I changed my image with the same results. Then I changed my password, same thing.

Is there anything that I am missing to help confirm this issue? Which version of Kubuntu? Which version of KDE?

Changed in hundredpapercuts:
status: New → Incomplete
Changed in kdebase-workspace (Ubuntu):
status: New → Incomplete
Revision history for this message
Kyle Evans (kyledevans) wrote :

I'm using Kubuntu 9.04. I've had this issue show up with KDE 4.2.2, 4.2.4 and now 4.3 beta 2. It also happened with Fedora 10 and 11. This happens on both my desktop and my laptop. Sometimes the issue goes away and I am able to change those details without problem. If the issue does go away, it's after I've changed those details at least once.

If you're trying to recreate the problem, try making a new user. If I have time tonight I'll download the KDE source and see if I can find any issues. Although, I haven't done any KDE programming so I might not be able to turn up anything.

Revision history for this message
Rohan Garg (rohangarg) wrote :

I cannot reproduce this bug either.I can successfuly apply changes to my email and save them
Kubuntu 9.04 x86-64 kde 4.3 beta 2

Revision history for this message
Kyle Evans (kyledevans) wrote :

Ok I don't see how I can consistently be running into this issue(even across different computers and Linux distros!) and no one else has ran into this. I'm still trying to fetch the KDE sources but am running into troubles due to ISP fair access limits. Hopefully by tomorrow I'll have them downloaded.

I usually set up my computers to automatically login to my account and to allow password-less logins. However I just checked if disabling those features fixed the problem with no luck.

I've just checked again on my Asus EEE 1000 (running Fedora 11 with KDE 4.2.4). Trying to change my name causes the System Settings to lock up(my desktop never locks up, it just gives the error as stated in the original bug report). If I were to guess wildly at what is going on, it seems that System Settings is trying to access some file it shouldn't need/be able to access. Tomorrow I'm going to a location with a better Internet connection so I should be able to actually look and see if I can dig up anything.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

I have run in to this before in Kubuntu 8.10, but I am no longer able to reproduce it in 9.04 or up. No clue what the problem is.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

I can confirm this issue, actually. I was just not seeing it when actually changing my password, where one would expect that the error would show up.

Changed in kdebase-workspace (Ubuntu):
importance: Undecided → Low
status: Incomplete → Confirmed
summary: - (Kubuntu) "About Me" in System Settings throws an error when changing
- details
+ "About Me" in System Settings throws an error when changing details
Changed in kdebase-workspace (Ubuntu):
status: Confirmed → Triaged
Changed in hundredpapercuts:
status: Incomplete → New
Changed in kdebase:
status: Unknown → Confirmed
Revision history for this message
Achim Bohnet (allee) wrote :

In karmic with 4:4.2.98-0ubuntu3 I get:

$ chfn -f "Foo Bar"
chfn: Permission denied.

chfnprocess.cpp tries exactly the above:

...
  QList<QByteArray> args;
      args += "-f";
      args += name;
  int ret = KDESu::PtyProcess::exec("chfn", args);
  if (ret < 0)
      return ChfnNotFound;

and chfn manpage explains:

... account, subject to the restrictions in /etc/login.defs. (The default
       configuration is to prevent users from changing their fullname.) The
...

So one possible solution would be to query GECOS for fullname. And show it as a readonly label. As no other chfn/finger infos are used in the dialog, one would also get rid of the passwd prompt (chfn ask always for the user pw)

<mumble>Somehow I've the feeling this kcm module should got away completely and be replace with usermanagement/addressbook and email setting as used by mailody/kmail. :) </mumble>
Achim

Revision history for this message
Achim Bohnet (allee) wrote :

Appended a patch that

 * disables the FullName field as it can not be changed via chfn
 * if no fullname is set yet (eg. via kmail) then extract fullname from gecos.

The patch is IMO okay for kubuntu but not ready for upstream, because

* does not dynamicly check if fullname can be changed with chfn.
* is maybe linux centric (only tested with karmic)

Achim

Revision history for this message
In , Achim Bohnet (allee) wrote :

Created attachment 35806
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

Achim Bohnet (allee)
Changed in hundredpapercuts:
assignee: nobody → Achim Bohnet (allee)
status: New → Fix Committed
Changed in kdebase-workspace (Ubuntu):
status: Triaged → Fix Committed
affects: kdebase-workspace (Ubuntu) → kdebase (Ubuntu)
Changed in kdebase (Ubuntu):
assignee: nobody → Achim Bohnet (allee)
Achim Bohnet (allee)
Changed in hundredpapercuts:
status: Fix Committed → Fix Released
Changed in kdebase (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Mark Constable (markc) wrote :

Just as a note if anyone lands here via a search for another distro. It's likely that this problem can also be solved by making sure "CHFN_RESTRICT frwh" includes the "f" in /etc/login.defs because the action of saving the user details in System Settings -> About Me also updates the /etc/passwd GECOS field but that will be denied by the underlying system if the f is missing from CHFN_RESTRICT.

Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 233956 has been marked as a duplicate of this bug. ***

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I have the exact same problem on Ubuntu Maverick (KDE 4.5.1). Did the problem come back?

Changed in kdebase (Ubuntu):
status: Fix Released → New
Changed in kdebase (Ubuntu):
milestone: none → ubuntu-10.10
tags: added: iso-testing kubuntu
Changed in kdebase (Ubuntu):
assignee: Achim Bohnet (allee) → Alessandro Ghersi (alessandro-ghersi)
status: New → Confirmed
Changed in kdebase (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdebase - 4:4.5.1-0ubuntu4

---------------
kdebase (4:4.5.1-0ubuntu4) maverick; urgency=low

  * Enable kubuntu_18_fix_systemsettings_about_me was removed
    in 4:4.4.80-0ubuntu1 (LP: #390396)
 -- Alessandro Ghersi <email address hidden> Sun, 03 Oct 2010 06:56:08 +0200

Changed in kdebase (Ubuntu):
status: Fix Committed → Fix Released
Changed in kdebase (Ubuntu):
status: Fix Released → New
status: New → Confirmed
Revision history for this message
Alessandro Ghersi (alessandro-ghersi) wrote :

Why you changed the bug status to Fix released -> New -> Confirmed without comment?
It's fixed here.

Changed in kdebase (Ubuntu):
status: Confirmed → Fix Released
Changed in kdebase:
importance: Unknown → Medium
Revision history for this message
In , Vovochka (vovochka13) wrote :

It's KDE 4.6.0 but nobody cares about this bug :(

Revision history for this message
In , Balcaen John (balcaen-john) wrote :

Created attachment 60134
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

Revision history for this message
In , Johu-h (johu-h) wrote :

Bug still present in KDE SC 4.7.3.

Revision history for this message
In , Shubhadeepc (shubhadeepc) wrote :

Still present in KDE 4.8. Beta2

Revision history for this message
In , Johu-h (johu-h) wrote :

ping

Revision history for this message
In , Denis-koryavov (denis-koryavov) wrote :
Revision history for this message
In , Michael (kensington) wrote :

*** Bug 298694 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 301201 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alexander Mezin (mezin-alexander) wrote :

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

Revision history for this message
In , Jbev-kdebugs-01 (jbev-kdebugs-01) wrote :

Updating version, still hanging in 4.10.

Changed in kde-baseapps:
status: Confirmed → Unknown
Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 317804 has been marked as a duplicate of this bug. ***

Revision history for this message
In , genstorm (andreas-sturmlechner) wrote :

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.

Revision history for this message
In , God-g (god-g) wrote :

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.

Revision history for this message
In , God-g (god-g) wrote :

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.

Revision history for this message
In , Sudhir Khanger (sudhirkhanger) wrote :

The bug still exist in 4.11.0-2 on Arch Linux.

Revision history for this message
In , blackst0ne (blackst0ne-ru) wrote :

The bug still exists in 4.11.2 on Gentoo Linux.

Revision history for this message
In , Martin-schnitkemper (martin-schnitkemper) wrote :

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.

Revision history for this message
In , Danieljosecarvalho (danieljosecarvalho) wrote :

*** Bug 329762 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sam Ward (samward1965) wrote :

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...

Revision history for this message
In , RJVB (rjvbertin) wrote :

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?

Revision history for this message
In , Achim Bohnet (allee) wrote :

(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

Revision history for this message
In , Arwald95 (arwald95) wrote :

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.

Revision history for this message
In , Dāvis (davispuh) wrote :

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`

Revision history for this message
In , Dāvis (davispuh) wrote :

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.

Revision history for this message
In , Andreas Ege (andreas-y5m) wrote :

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. :-(

Revision history for this message
In , Michael (kensington) wrote :

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

Changed in kde-baseapps:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.