After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681866 - user-accounts: Slim down password dialog for remote users
user-accounts: Slim down password dialog for remote users
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: User Accounts
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on: 681770
Blocks: 681753
 
 
Reported: 2012-08-14 17:06 UTC by Stef Walter
Modified: 2021-06-09 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Slim down password dialog for remote users (6.45 KB, patch)
2012-08-14 17:06 UTC, Stef Walter
needs-work Details | Review
old password focus fix (1008 bytes, patch)
2012-09-13 08:14 UTC, Ondrej Holy
rejected Details | Review
0001-user-accounts-Disable-password-changing-for-remote-u.patch (1.42 KB, patch)
2012-09-17 11:35 UTC, Bastien Nocera
none Details | Review
user-accounts: Disable password changing for remote users (1.42 KB, patch)
2012-09-17 12:20 UTC, Stef Walter
committed Details | Review
old password focus fix (944 bytes, patch)
2012-09-17 13:49 UTC, Ondrej Holy
reviewed Details | Review

Description Stef Walter 2012-08-14 17:06:46 UTC
In order to be useful for non-local users the password dialog
needs to recognize when a user is non-local, and change its
look and behavior accordingly.
Comment 1 Stef Walter 2012-08-14 17:06:49 UTC
Created attachment 221179 [details] [review]
user-accounts: Slim down password dialog for remote users

 * Remove irrelevant options for non-local users, such as
   password hints, and the action combo.
 * Always show the 'old password' fields for non-local users.
Comment 2 Stef Walter 2012-08-14 17:10:41 UTC
I haven't tested the dialog password behavior for non-local users, only the way it looks (my Active Directory VM is down due to Fedora rawhide mess). But will do shortly, and possibly follow up with another patch which makes sure that the dialog works correctly.

This depends on bug 681770, in particular the um_user_is_local_account() patch.

Allan is doing some more mockups on how this should look in the future, and we'll probably complete the implementation of that in 3.8. But these changes are to unbreak the dialog for the enterprise logins that are added in 3.6, and we don't have time to make all the changes.

See: https://dl.dropbox.com/u/5031519/system-settings/user-accounts.png

Allan, by the way, 'change password' is a relevant field for non-local users, although obviously the behavior is more limited. I think it was omitted from that 
mockup.

*** This bug has been marked as a duplicate of bug 681770 ***
Comment 3 Stef Walter 2012-08-14 17:11:40 UTC
Er, not a duplicate, depends on.
Comment 4 Bastien Nocera 2012-08-18 18:19:33 UTC
Review of attachment 221179 [details] [review]:

Looks fine, commit once you've tested.
Comment 5 Matthias Clasen 2012-09-12 19:17:54 UTC
Would be great to get this tested and landed for .92
Comment 6 Ondrej Holy 2012-09-13 08:14:09 UTC
(In reply to comment #4)
> Review of attachment 221179 [details] [review]:
> 
> Looks fine, commit once you've tested.

The stefw patch change dialog successfully, however there is bad focus on the new password entry instead of the old password entry.
Comment 7 Ondrej Holy 2012-09-13 08:14:42 UTC
Created attachment 224197 [details] [review]
old password focus fix
Comment 8 Ondrej Holy 2012-09-13 08:24:23 UTC
However password isn't changed successfully, but this is probably another bug.

(gnome-control-center:22572): user-accounts-cc-panel-WARNING **: SetPassword call failed: GDBus.Error:org.freedesktop.Accounts.Error.Failed: running '/usr/sbin/usermod' failed: /usr/sbin/usermod returned an error (6): usermod: user 'OHOLY\administrator' does not exist in /etc/passwd
Comment 9 Matthias Clasen 2012-09-14 18:14:41 UTC
Review of attachment 224197 [details] [review]:

::: panels/user-accounts/um-password-dialog.c
@@ -707,3 @@
         gtk_window_set_transient_for (GTK_WINDOW (um->dialog), parent);
         gtk_window_present (GTK_WINDOW (um->dialog));
-        if (um->old_password_ok == FALSE)

This change is wrong. What the code was previously doing is
'If the old password is not right, focus the old_password_entry.'
Which makes sense, since we are asking the user to enter the old password.
I think mistake you are seeing is because Stef'w patch does

old_password_ok = gtk_widget_is_visible (old_password_entry);

when it really should say

old_password_ok = !gtk_widget_is_visible (old_password_entry);

ie if the old_password_entry is not visible, we can't focus it anyway, so focus the new password entry.
Comment 10 Matthias Clasen 2012-09-14 18:15:35 UTC
Review of attachment 221179 [details] [review]:

::: panels/user-accounts/um-password-dialog.c
@@ +681,3 @@
+
+        update_visibility (um);
+        um->old_password_ok = gtk_widget_get_visible (um->old_password_entry);

I think this needs to be 

old_password_ok = !gtk_widget_get_visible (old_password_entry);
Comment 11 Stef Walter 2012-09-17 09:14:29 UTC
(In reply to comment #8)
> However password isn't changed successfully, but this is probably another bug.
> 
> (gnome-control-center:22572): user-accounts-cc-panel-WARNING **: SetPassword
> call failed: GDBus.Error:org.freedesktop.Accounts.Error.Failed: running
> '/usr/sbin/usermod' failed: /usr/sbin/usermod returned an error (6): usermod:
> user 'OHOLY\administrator' does not exist in /etc/passwd

Hmmm, that's a big problem. I've filed a bug: https://bugs.freedesktop.org/show_bug.cgi?id=55002

Bastien, Ray, it seems that the password change for remote users cannot be fixed without the above AccountsService change. So it probably won't work for 3.6. 

Should we just disable this password change for remote users through gnome-control-center for 3.6.x?
Comment 12 Bastien Nocera 2012-09-17 11:35:25 UTC
Created attachment 224492 [details] [review]
0001-user-accounts-Disable-password-changing-for-remote-u.patch

Does this work for you?
Comment 13 Stef Walter 2012-09-17 12:20:59 UTC
Created attachment 224496 [details] [review]
user-accounts: Disable password changing for remote users

Works-around:
https://bugs.freedesktop.org/show_bug.cgi?id=55002
See also:
https://bugzilla.gnome.org/show_bug.cgi?id=681866#c11
Comment 14 Ondrej Holy 2012-09-17 13:43:18 UTC
(In reply to comment #9)
> Review of attachment 224197 [details] [review]:
> 
> ::: panels/user-accounts/um-password-dialog.c
> @@ -707,3 @@
>          gtk_window_set_transient_for (GTK_WINDOW (um->dialog), parent);
>          gtk_window_present (GTK_WINDOW (um->dialog));
> -        if (um->old_password_ok == FALSE)
> 
> This change is wrong. What the code was previously doing is
> 'If the old password is not right, focus the old_password_entry.'
> Which makes sense, since we are asking the user to enter the old password.
> I think mistake you are seeing is because Stef'w patch does
> 
> old_password_ok = gtk_widget_is_visible (old_password_entry);
> 
> when it really should say
> 
> old_password_ok = !gtk_widget_is_visible (old_password_entry);
> 
> ie if the old_password_entry is not visible, we can't focus it anyway, so focus
> the new password entry.

Ok, thanks, you are right. I'll have to be more careful next time.
Comment 15 Ondrej Holy 2012-09-17 13:49:55 UTC
Created attachment 224509 [details] [review]
old password focus fix
Comment 16 Bastien Nocera 2012-09-17 17:49:30 UTC
Seeing as we can't change the password for remote users for now (as per fd.o bug), let's punt this to 3.8.
Comment 17 Ondrej Holy 2014-01-24 12:53:37 UTC
Comment on attachment 224509 [details] [review]
old password focus fix

Marking as reviewed to get it off from unreviewed patches list. Should be included in stefw patch...
Comment 18 André Klapper 2021-06-09 16:07:27 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.