Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-7559

Unix Connector is not able to create/delete users on server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Reviewed
    • 4.3.1
    • None
    • Connectors, ConnId
    • None
    • Active subscription

    Description

      Hi,

      we're trying to administrate Red Hat Enterprise Linux servers using the Unix Connector and we're experiencing the following issue.

      The configuration of the resource was implemented according to the samples available in midPoint repository and the connector is able to run sudo commands and list accounts.

      In midPoint, we have created a new account with password configurated and activation status set to "enabled". We have tried to add a projection on target server for this account and the "preview changes" mode was OK, but when the account had to be created the operation timed out with the following error: "Could not create user: sudo: useradd: command not found, reason: Could not create user: sudo: useradd: command not found".

      org.connid.bundles.unix log:
      "2022-01-12 12:37:24,227 TRACE: method: null msg:Connetion is OK (checkAlive)
      2022-01-12 12:37:24,227 DEBUG: method: null msg:Create OP
      2022-01-12 12:37:24,228 TRACE: method: null msg:Executing on: serveripaddress
      2022-01-12 12:37:24,228 TRACE: method: null msg:Configurations: timeout(5,000), readTimout(30,000), timeToWait(1,000)
      2022-01-12 12:37:24,228 TRACE: method: null msg:Trying to open exec channel
      2022-01-12 12:37:24,228 TRACE: method: null msg:Exec channel openned
      2022-01-12 12:37:24,228 TRACE: method: null msg:Command to execute: sudo -k; echo password | sudo -v -S; sudo useradd -d "/home/test_user" -s "/bin/bash" -m test_user
      2022-01-12 12:37:24,250 TRACE: method: null msg:Reading output
      2022-01-12 12:37:24,251 TRACE: method: null msg:Channel for serveripaddress closed: false
      2022-01-12 12:37:24,476 TRACE: method: null msg:Channel for serveripaddress closed: true
      2022-01-12 12:37:24,476 TRACE: method: null msg:Input stream, available 68
      2022-01-12 12:37:24,476 TRACE: method: null msg:Reading line: sudo: useradd: command not found
      2022-01-12 12:37:24,476 TRACE: method: null msg:exit-status: 1
      2022-01-12 12:37:24,476 TRACE: method: null msg:buffer sudo: useradd: command not found

      2022-01-12 12:37:24,477 TRACE: method: null msg:Disconnecting execChannel
      2022-01-12 12:37:24,477 ERROR: method: null msg:Could not create user: sudo: useradd: command not found"

       

      /var/log/secure of the target server:
      "2022-01-12 12:28:50+01:00 serveripaddress sudo:midpoint_user : TTY=pts/1 ; PWD=/home/midpoint_user ; USER=root ; COMMAND=validatemidpoint_user : TTY=pts/1 ; PWD=/home/midpoint_user ; USER=root ; COMMAND=validate"

      The issue is registered only by midPoint side, it seems like the command doesn't come to the server. 
      In addition, executing the command (sudo  -k; echo password | sudo  -v -S; sudo useradd -d "/home/test_user" -s "/bin/bash" -m test_user) directly from the server terminal, the user is created.

      Attachments

        Activity

          People

            mariannadebiasio Marianna De Biasio
            mariannadebiasio Marianna De Biasio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: