Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1739

Bugfix for user promise type on HP-UX

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.6
    • Component/s: Promise type: users
    • Labels:
      None

      Description

      I have attached a proposed patch which fixes the user promise type for HP-UX. There are two issues in the current code

      On HP-UX, there are two variants of useradd, one for adding users and one for changing system defaults. The first one does not support -M, but the second one does and both is listet with -h:
      #useradd -h
      Unrecognized Option 'h'
      Usage: useradd [-u <uid> [-o]] [-g <group>] [-G <group>[,<group...>]] [-d <dir>] [-s <shell>] [-c <comment>] [-m [-k <skel dir>]] [-f <inactive>] [-e <expire>] [-r <yes|no>] [-p <encrypted-password>] [-t <template>] [-P -S <alternate password file>] <login>
      Usage: useradd -D [-g <group>] [-b <base dir>] [-f <inactive>] [-e <expire>] [-r <yes|no>] [-M <yes/no>] [-k <skel dir>] [-O <yes/no>] [-s <shell>] [-c <comment>] [-t <template>]

      Thus the -M option is added to useradd and the useradd command fails.

      The second issue is the SuSe hack added for secondary groups. usermod on HP-UX does not support -G with empty argument, and thus the usermod command will fail.

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              hmoe Håvard Moen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel