users-admin does not work with empty passwords

Bug #316667 reported by Henri MICHEL
48
This bug affects 1 person
Affects Status Importance Assigned to Milestone
liboobs
Fix Released
Critical
liboobs (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: liboobs-1-4

1) Release: lsb_release -rd
    Description: Ubuntu 8.04.1
    Release: 8.04
2) version of package: apt-cache policy liboobs-1-4 gnome-system-tools
  liboobs-1-4:
    Installed: 2.22.0-0ubuntu1
    Candidate: 2.22.0-0ubuntu1
    Version table:
   *** 2.22.0-0ubuntu1 0
          500 http://fr.archive.ubuntu.com hardy/main Packages
          100 /var/lib/dpkg/status
  gnome-system-tools:
    Installed: 2.22.0-0ubuntu9
    Candidate: 2.22.0-0ubuntu9
    Version table:
   *** 2.22.0-0ubuntu9 0
          500 http://fr.archive.ubuntu.com hardy/main Packages
          100 /var/lib/dpkg/status

3) Expectations:
    users-admin should be able to add/delete/modify user account
    setting even if a user happen to have an empty password

4) What happens:
 a) add user, remove the password: you probably have to edit manually
    /etc/shadow for this
 b) at this point, managing groups with users-admin still work but
    anything related to user account management (adding a user, deleting a
    user changing properties for a user does not work any more
 c) what is very frustrating is that there is absolutely no visual
    feedback of this error condition. When adding a new user a new line
    shows up in the interface as in normal case. But /etc/passwd /etc/shadow
    ... are NOT modified
 d) the following shows up on stderr:
----------------------------------------------------------------------
(users-admin:11895): Liboobs-CRITICAL **: create_dbus_struct_from_user: assertion `(login && password && homedir && shell)' failed
(users-admin:11895): Liboobs-CRITICAL **: Not committing due to inconsistencies in the configuration, this reflects a bug in the application
----------------------------------------------------------------------

5) Proposed fix
   Quick fix is to relax the assert in oobs-usersconfig.c
   >> g_return_val_if_fail ((login && password && homedir && shell), FALSE);

     I guess. it would be much cleaner to intervene in the protocol used by
     the users-admin frontend to talk to back-ends. There should be a
     way to say that a data must exist but maybe be an empty string.
     Can't you differentiate between failures in network transport or
     server routines (aka backends) failures (for example perl
     installation corruption) and empty string put on purpose ?
     Sorry I know rpc,corba,network porgramming, asn1.. but I'm
     totally ignorant on how you describe data exchange
     for dbus, how you register handlers/services, how you "tcpdump"
     the dbus protocol exchange.

6) Rational of this request for a fix:
   a) I agree that users with empty passwords are a bad thing and should be
      avoided by default But I guess there are situations (standalone
      computers, with restricted access and no network connections) where it
      makes sense (after tweaking /etc/pam.d/common-auth a little of course.
      Even sshd allows this if you explicitly ask for it (option
      PermitEmptyPasswords)
   b) liboobs should provide "Mechanism, not Policy". Provision to ban
      empty passwords should lie in the frontend NOT in the protocol
      between frontend and backend
   c) by the way assuming that home and shell should also be .neq. ""
      is also questionable

7) affected releases
   I guess anything higher that ubuntu 8.04 is affected. 7.10 is not

Revision history for this message
Henri MICHEL (henri-j-michel) wrote :
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Thanks for these detailed considerations and for the patch. Though the fix is even simpler, and we already did this recently so that we don't fail if home dir or shell fields are empty. Since perl is nice, returning back a NULL password is not a problem to it, since it's converted to the empty string. Removing the check was enough. Please test that in Karmic as soon as you get it, and report if there are still issues (the fix will be available with the next GNOME beta release).

You seem to master the way the gnome-system-tools work. Please feel free to continue reporting precise bugs, and propose patches, since there are many of them, and support is always welcome! If needed, I can help you to find what you want in order to fix something.

Changed in liboobs (Ubuntu):
status: New → Confirmed
Changed in liboobs:
status: Unknown → Fix Released
Changed in liboobs (Ubuntu):
status: Confirmed → Fix Committed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package liboobs - 2.22.2-0ubuntu1

---------------
liboobs (2.22.2-0ubuntu1) karmic; urgency=low

  * New upstream release: (LP: #427007)
    2.22.2
    - Print error from D-Bus in case of failure on start. This should greatly
      help debugging.
    - Don't consider empty user password as invalid.
    - Make gtk-doc code documentation use inlined section comments, so that it
      is updated on every change. This will ensure the documentation does not
      get outdated again.
    2.22.1
    - Don't fail if homedir or shell are not set. (LP: #316667)
    - Fix crash when path to share is empty.
  * debian/control.in:
    - Bump gtk-doc-tools build-depends
    - Add BZR link
  * debian/patches/01_smb_crash.patch:
    - Applied upstream
  * debian/rules:
    - Build with --enable-gtk-docs

 -- Robert Ancell <email address hidden> Tue, 22 Sep 2009 14:38:46 +1000

Changed in liboobs (Ubuntu):
status: Fix Committed → Fix Released
Changed in liboobs:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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