[AWX 19.5] - password for awx superuser container

This command creates a superuser to access awx web;
kubectl exec -n awx -it awx-xxxxxxxxxxxx -c awx-task – /bin/bash

But what is the superuser password of the container user awx;?
or how to configure a superuser for awx-taks container?

bash-4.4$ id

uid=1000(awx) gid=0(root) groups=0(root),1000

bash-4.4$ sudo su -

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for awx:

Hi there,
We have docs on how to configure a superuser here: https://docs.ansible.com/ansible-tower/latest/html/administration/tipsandtricks.html#id3
cheers,
@rebeccahhh

Unfortunately, the link does not answer the original question.
I am facing this issue too. I am unable to become root in awx-ansible-task pod.

im also interested into this.

Dne čtvrtek 3. března 2022 v 5:23:28 UTC+1 uživatel Balaji Rchawdi napsal:

What I’ve used is:

kubectl -n (AWX container name) get secret awx-admin-password -o go-template=‘{{range $k,$v := .data}}{{printf “%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{”\n"}}{{end}}’

Hope this helps.
Thomas

Thank You, Thomas

This command gives the password for user “admin”. I used it to log in to http://<IP_address>:31280 awx webUI.

Hi everyone,
I am also very interested in getting the answer.
Have you found a solution in the meantime?

Thank you and best regards, H

Hi,

You may just try to do “docker exec -u0 -it container_name bash” to get root permission in the running container. If you are on minikube you may need to do a “minikube ssh” first to gain access to the running containers. This will be different if you are using something else like k3s

AWX Team

Hi
Thanks but I’m using as you said k3s. Is this a solution with that?
Hiero-nymo

Yoy can use kubectl Exec into the awx-Web container

Hi,

Technically, you can.
However, it is important to note that any changes in the container are volatile and all changes will be lost on re-creation of the pod.
If you need this method for anything other than debugging or investigation purposes, I think you are probably on the wrong way for your purpose.

$ sudo /usr/local/bin/k3s ctr task exec -t --exec-id --user 0 bash

e.g.

$ sudo /usr/local/bin/k3s ctr task exec -t --exec-id bash-example --user 0 c2db413be4684979c9055c788f751c676b8c898d33582c5fa7dbeeef8ec8fb22 bash

i am having same question, can anyone help ?
trying to install tcpdump

kubectl exec -i -t -n awx --container awx-web – /bin/bash
bash-5.1$ yum install tcpdump
Error: This command has to be run with superuser privileges (under the root user on most systems).
bash-5.1$
bash-5.1$
bash-5.1$ sudo yum install tcpdump

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for awx:

@khush which k8s are you using? (k3s, minikube, etc)

kuro’s suggestion above is the way to do it via k3s

the other alternative is to use docker to build a new image based off of quay.io/ansible/awx image and install tcpdump. Then you can use that image by setting “image” and “image_version” in your awx CRD

AWX Team

tanq u. lemme chk to install in the new image