Score:0

FreeIPA user_add fails to add user "user already exists" when it doesn't

tf flag

I am getting an error when trying to create users in FreeIPA. Can someone help me figure out the problem?

ipa: ERROR: user with name "ttest" already exists
ipa user_show ttest
ipa: ERROR: ttest: user not found
ipa user_find ttest
---------------
0 users matched
---------------
----------------------------
Number of entries returned 0
----------------------------
ldapsearch -x -b "cn=accounts,dc=.....,dc=....." -D "uid=.....,cn=users,cn=accounts,dc=.....,dc=....." -W uid=ttest
# extended LDIF
#
# LDAPv3
# base <cn=accounts,dc=.....,dc=.....> with scope subtree
# filter: uid=ttest
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

Debug output:

ipa: DEBUG: Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index'
ipa: DEBUG: Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
ipa: DEBUG: Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
ipa: DEBUG: importing all plugin modules in ipaclient.remote_plugins.schema$02af11e4...
ipa: DEBUG: importing plugin module ipaclient.remote_plugins.schema$02af11e4.plugins
ipa: DEBUG: importing all plugin modules in ipaclient.plugins...
ipa: DEBUG: importing plugin module ipaclient.plugins.automember
ipa: DEBUG: importing plugin module ipaclient.plugins.automount
ipa: DEBUG: importing plugin module ipaclient.plugins.ca
ipa: DEBUG: importing plugin module ipaclient.plugins.cert
ipa: DEBUG: importing plugin module ipaclient.plugins.certmap
ipa: DEBUG: importing plugin module ipaclient.plugins.certprofile
ipa: DEBUG: importing plugin module ipaclient.plugins.dns
ipa: DEBUG: importing plugin module ipaclient.plugins.hbacrule
ipa: DEBUG: importing plugin module ipaclient.plugins.hbactest
ipa: DEBUG: importing plugin module ipaclient.plugins.host
ipa: DEBUG: importing plugin module ipaclient.plugins.idrange
ipa: DEBUG: importing plugin module ipaclient.plugins.internal
ipa: DEBUG: importing plugin module ipaclient.plugins.location
ipa: DEBUG: importing plugin module ipaclient.plugins.migration
ipa: DEBUG: importing plugin module ipaclient.plugins.misc
ipa: DEBUG: importing plugin module ipaclient.plugins.otptoken
ipa: DEBUG: importing plugin module ipaclient.plugins.otptoken_yubikey
ipa: DEBUG: importing plugin module ipaclient.plugins.passwd
ipa: DEBUG: importing plugin module ipaclient.plugins.permission
ipa: DEBUG: importing plugin module ipaclient.plugins.rpcclient
ipa: DEBUG: importing plugin module ipaclient.plugins.server
ipa: DEBUG: importing plugin module ipaclient.plugins.service
ipa: DEBUG: importing plugin module ipaclient.plugins.sudorule
ipa: DEBUG: importing plugin module ipaclient.plugins.topology
ipa: DEBUG: importing plugin module ipaclient.plugins.trust
ipa: DEBUG: importing plugin module ipaclient.plugins.user
ipa: DEBUG: importing plugin module ipaclient.plugins.vault
ipa: DEBUG: found session_cookie in persistent storage for principal '.....', cookie: 'ipa_session=MagBearerToken=.....'
ipa: DEBUG: setting session_cookie into context 'ipa_session=MagBearerToken=.....'
ipa: DEBUG: trying https://...../ipa/session/json
ipa: DEBUG: Created connection context.rpcclient_140053371972240
ipa: DEBUG: raw: command_defaults('user_add/1', params=['cn'], kw={'givenname': 'test', 'sn': 'test'}, version='2.240')
ipa: DEBUG: command_defaults('user_add/1', params=('cn',), kw={'givenname': 'test', 'sn': 'test'}, version='2.240')
ipa: DEBUG: [try 1]: Forwarding 'command_defaults/1' to json server 'https://...../ipa/session/json'
ipa: INFO: Request: {
    "id": 0,
    "method": "command_defaults/1",
    "params": [
        [
            "user_add/1"
        ],
        {
            "kw": {
                "givenname": "test",
                "sn": "test"
            },
            "params": [
                "cn"
            ],
            "version": "2.240"
        }
    ]
}
ipa: DEBUG: New HTTP connection (.....)
ipa: INFO: Response: {
    "error": null,
    "id": 0,
    "principal": ".....",
    "result": {
        "result": {
            "cn": "test test"
        }
    },
    "version": "4.9.3"
}
ipa: DEBUG: raw: user_add('ttest', givenname='test', sn='test', version='2.240')
ipa: DEBUG: user_add('ttest', givenname='test', sn='test', version='2.240')
ipa: DEBUG: [try 1]: Forwarding 'user_add/1' to json server 'https://...../ipa/session/json'
ipa: INFO: Request: {
    "id": 0,
    "method": "user_add/1",
    "params": [
        [
            "ttest"
        ],
        {
            "givenname": "test",
            "sn": "test",
            "version": "2.240"
        }
    ]
}
ipa: DEBUG: HTTP connection keep-alive (.....)
ipa: INFO: Response: {
    "error": {
        "code": 4002,
        "data": {},
        "message": "user with name \"ttest\" already exists",
        "name": "DuplicateEntry"
    },
    "id": 0,
    "principal": ".....",
    "result": null,
    "version": "4.9.3"
}
ipa: DEBUG: Destroyed connection context.rpcclient_140053371972240
ipa: ERROR: user with name "ttest" already exists
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.