[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to grant system:admin rights to admin?

Hi Graham,

That would be probably fine. I assume that I should log in as system:admin in order to execute those commands, right?

The problem is that I cannot switch to system:admin...

oc login -u system:admin
Authentication required for https://localhost:8443 (openshift)
Username: system:admin
error: username system:admin is invalid for basic auth

Any idea what I'm doing wrong?


pon., 5 cze 2017 o 12:28 użytkownik Graham Dumpleton <gdumplet redhat com> napisał:

> On 5 Jun 2017, at 8:13 PM, Henryk Konsek <hekonsek gmail com> wrote:
> Hi,
> Quick question. Is there an easy way to grant "system:admin" privileges to "admin" user? I'd like to make it possible for 'admin' user to list projects and namespaces for example. I'm aware that this is not recommended for production environment, but this is something we need for an automation of our integration tests suite.

Not sure if suits your requirements, but presuming 'username' exists, as user who already has admin rights, try:

        oc adm policy add-cluster-role-to-user cluster-reader username

If only want them to be able to read view stuff but not modify, or:

        oc adm policy add-cluster-role-to-user cluster-admin username

if want to allow them full edit ability on cluster.

Replace 'username' with actual name of user.


Henryk Konsek

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]