output of ipa user-add testobject --noprivate --first Test --last Object --setattr description='some value':
ipa user-add testobject --noprivate --first Test --last Object --setattr description='some value'
ipa: ERROR: non-public: AttributeError: 'unicode' object has no attribute 'append' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 349, in wsgi_execute result = self.Command[name](*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in __call__ ret = self.run(*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 760, in run return self.execute(*args, **options) File "/usr/lib/python2.7/site-packages/ipalib/plugins/baseldap.py", line 1153, in execute *keys, **options) File "/usr/lib/python2.7/site-packages/ipalib/plugins/user.py", line 744, in pre_callback entry_attrs['description'].append(NO_UPG_MAGIC) AttributeError: 'unicode' object has no attribute 'append' ipa: INFO: [jsonserver_kerb] admin@IDM.LAB.ENG.BRQ.REDHAT.COM: user_add(u'testobject', givenname=u'Test', sn=u'Object', cn=u'Test Object', displayname=u'Test O
maybe it might be fixed by removing from baseldap.py:process_attr_options:
elif isinstance(entry_attrs[attr], (tuple, list)) and len(entry_attrs[attr]) == 1: entry_attrs[attr] = entry_attrs[attr][0]
Usecase is probably very rare since it uses general --setattr option and the fact that description attribute is not exposed in FreeIPA API
Linked to Bugzilla bug: https://bugzilla.redhat.com/show_bug.cgi?id=1206690 (Red Hat Enterprise Linux 7)
workaround: add the description in subsequent user-mod call. If it's needed in add op because of some reason, add two values: --setattr description='some value' --setattr description='second' and then reset it in subsequent mod operation.
--setattr description='some value' --setattr description='second'
Metadata Update from @pvoborni: - Issue assigned to someone - Issue set to the milestone: FreeIPA 4.5 backlog
Login to comment on this ticket.