GNOME Bugzilla – Bug 681866
user-accounts: Slim down password dialog for remote users
Last modified: 2021-06-09 16:07:27 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.
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.
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 ***
Er, not a duplicate, depends on.
Review of attachment 221179 [details] [review]: Looks fine, commit once you've tested.
Would be great to get this tested and landed for .92
(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.
Created attachment 224197 [details] [review] old password focus fix
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
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.
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);
(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?
Created attachment 224492 [details] [review] 0001-user-accounts-Disable-password-changing-for-remote-u.patch Does this work for you?
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
(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.
Created attachment 224509 [details] [review] old password focus fix
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 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...
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.