Bug 2220841 - `# realm leave --remove` command should not ask for credentials if a valid kerberos ticket is present.
Summary: `# realm leave --remove` command should not ask for credentials if a valid ke...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: realmd
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Sumit Bose
QA Contact: shridhar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-06 09:21 UTC by pdoiphod
Modified: 2023-07-13 13:43 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:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161665 0 None None None 2023-07-06 09:24:44 UTC
Red Hat Issue Tracker SSSD-6420 0 None None None 2023-07-13 13:42:59 UTC

Description pdoiphod 2023-07-06 09:21:55 UTC
Description of problem:

When we use --remove option with realm leave, it also deletes computer account from AD. With just realm leave it does not.
1. When we use realm leave --remove it asks for Admin user credentials.
So the requirement here is if I have a valid kerberos ticket, then it should use that ticket to remove system from AD domain and should not ask for credentials.
2. The above scenario works with realm join as its possible to join the domain without credentials if we have a valid kerberos ticket. This should work for realm leave --remove as well.


Version-Release number of selected component (if applicable):


How reproducible:
[Always]


Steps to Reproduce:
1. # realm leave --remove

Actual results:
# realm --remove leave
Password for Administrator: 

Expected results:
# realm --remove leave
#

[It should leave domain without asking for Admin credentials if a valid kerberos ticket is present]

Additional info:
[NA]

Comment 2 naresh.sukhija_ext 2023-07-10 06:39:32 UTC
Also, in case the user is specified with "-U" there needs to be a provision to check the kerberos token for that user instead of Admin user.


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