...
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
In karmic with 4:4.2.98-0ubuntu3 I get:
$ chfn -f "Foo Bar"
chfn: Permission denied.
chfnprocess.cpp tries exactly the above:
... PtyProcess: :exec(" chfn", args);
QList<QByteArray> args;
args += "-f";
args += name;
int ret = KDESu::
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