error (bashism?) in postinst

Bug #576307 reported by Øystein Viggen on 2010-05-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: samba

With a probably "non standard" /etc/passwd et al:

Adding group `sambashare' (GID 113) ...
Done.
Adding user `root' to group `sambashare' ...
Adding user root to group sambashare
Done.
adduser: The user `rootsh' does not exist.
/var/lib/dpkg/info/samba.postinst: 118: !getent: not found
dpkg: error processing samba (--configure):
 subprocess installed post-installation script returned error exit status 127

This change seems to fix the error:

--- samba.postinst.old 2010-05-06 11:14:40.056375778 +0200
+++ samba.postinst 2010-05-06 11:15:03.826382587 +0200
@@ -111,7 +111,7 @@
                IFS=","
                for USER in `getent group admin | cut -f4 -d:`; do
                        adduser "$USER" sambashare \
- || !getent passwd "$USER" >/dev/null
+ || ! getent passwd "$USER" >/dev/null
                done
                IFS="$OLDIFS"
        fi

samba version: 2:3.4.7~dfsg-1ubuntu3 (Ubuntu 10.04)

Chuck Short (zulcss) wrote :

Thanks, ill get this fixed for maverick and try to backport for lucid.

Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.5.2~dfsg-2ubuntu1

---------------
samba (2:3.5.2~dfsg-2ubuntu1) maverick; urgency=low

  * Merge from Debian Experimental, remaining changes:
    + debian/patches/VERSION.patch:
      - set SAMBA_VERSION_SUFFIX to Ubuntu.
    + debian/smb.conf:
      - Add "(Samba, Ubuntu)" to server string.
      - Comment out the default [homes] share, and add a comment about "valid users = %s"
        to show users how to restrict access to \\server\username to only username.
      - Set 'usershare allow guests', so that usershare admins are allowed to create
        public shares in additon to authenticated ones.
      - add map to guest = Bad user, maps bad username to guest access.
    + debian/samba-common.conf:
      - Do not change priority to high if dhclient3 is installed.
      - Use priority medium instead of high for the workgroup question.
    + debian/mksambapasswd.awk:
      - Do not add user with UID less than 1000 to smbpasswd.
    + debian/control:
      - Make libswbclient0 replace/conflict with hardy's likewise-open.
      - Don't build against ctdb, since its not in main yet.
    + debian/rules:
      - Enable "native" PIE hardening.
      - Add BIND_NOW to maximize benefit of RELRO hardening.
    + Add ufw integration:
      - Created debian/samba.ufw.profile.
      - debian/rules, debian/samba.dirs, debian/samba.files: install
    + Add apport hook:
      - Created debian/source_samba.py.
      - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
    + Dropped:
      - debian/patches/ubuntu-gecos-fix.patch: Fix gecos parsing backported from Samba 3.5.x
        (LP: #182572)

    [Chuck Short]
    * Removed unsupported smb.conf files.
    * debian/samba.postinst: Fixed bashism. (LP: #576307)
 -- Chuck Short <email address hidden> Fri, 07 May 2010 14:40:42 -0400

Changed in samba (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers