1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/impersonation-system-admin-user.adoc
2026-02-04 16:06:59 +00:00

40 lines
1.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Module included in the following assemblies:
//
// * users_and_roles/impersonating-system-admin.adoc
:_mod-docs-content-type: PROCEDURE
[id="impersonation-system-admin-user_{context}"]
= Impersonating the system:admin user
[role="_abstract"]
You can use the OpenShift Console to impersonate a user and select multiple group memberships at the same time to reproduce that users effective permissions.
.Procedure
* To grant a user permission to impersonate `system:admin`, run the following command:
+
[source,terminal]
----
$ oc create clusterrolebinding <any_valid_name> --clusterrole=sudoer --user=<username>
----
+
[TIP]
====
You can alternatively apply the following YAML to grant permission to impersonate `system:admin`:
[source,yaml]
----
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: <any_valid_name>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sudoer
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: <username>
----
====