Bug 2063168 - [RFE] ipa user-undel <ipauser> doesnot restore the subid of the deleted user
Summary: [RFE] ipa user-undel <ipauser> doesnot restore the subid of the deleted user
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-11 12:25 UTC by Sudhir Menon
Modified: 2022-11-08 12:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7956 0 None None None 2022-03-11 12:32:09 UTC
Red Hat Issue Tracker RHELPLAN-115337 0 None None None 2022-03-11 12:32:15 UTC

Description Sudhir Menon 2022-03-11 12:25:19 UTC
Description of problem: ipa user-undel <ipauser> doesnot restore the subid of the deleted user.

Version-Release number of selected component (if applicable):
ipa-server-4.9.8-7.module+el8.6.0+14337+19b76db2.x86_64

How reproducible: Always

Steps to Reproduce:
1. Install IPA and enable the below option. 
   #ipa config-mod --user-default-subid=true
2. Now create an ipauser and ensure that UniqueID gets generated for the user.
3. Now delete the ipauser using --preserve option and is listed under 'Preserved Users' tab.
4. Now restore the user again and run the 'ipa user-find and ipa subid-find' command respectively

Actual results:
ipa user-find displays the user, however ipa subid-find doesn't list the UniqueId set for the user.

[root@server ~]# ipa user-add test102
Added user "test102"
Subordinate ids: cd29793d-c5de-4846-a0c2-f5fb495b3627

[root@server ~]# ipa user-del --preserve
User login: test102
Deleted user "test102"

[root@server ~]# ipa subid-find
0 subordinate ids matched

[root@server ~]# ipa user-undel 
User login: test102
Undeleted user account "test102"

[root@server ~]# ipa subid-find
Number of entries returned 0

[root@server ~]# ipa user-find
  User login: test102
  First name: test102
  Last name: s
  Home directory: /home/test102
  Login shell: /bin/sh
  Principal name: test102
  Principal alias: test102
  Email address: test102
  UID: 794800007
  GID: 794800007
  Account disabled: False
Number of entries returned 3

Expected results:
When a user is preserved, the user restore should include all the attributes of the user when it was created.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.