[AWX 19.5] - password for awx superuser container

4,704 views
Skip to first unread message

Wesley Santos

unread,
Feb 3, 2022, 10:29:38 PM2/3/22
to AWX Project
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:

Rebeccah Hunter

unread,
Feb 9, 2022, 3:59:06 PM2/9/22
to AWX Project
Hi there,
cheers,
@rebeccahhh

Balaji Rchawdi

unread,
Mar 2, 2022, 11:23:28 PM3/2/22
to AWX Project
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.

Martin Gabriel

unread,
Mar 5, 2022, 1:40:19 PM3/5/22
to AWX Project
im also interested into this.

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

Thomas Renzy

unread,
Mar 7, 2022, 1:10:21 PM3/7/22
to Martin Gabriel, AWX Project
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


--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/875ef9e4-dd67-4be7-a394-56d6e6acad32n%40googlegroups.com.

Balaji Rchawdi

unread,
Mar 15, 2022, 9:31:27 PM3/15/22
to AWX Project

Thank  You, Thomas

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

Hiero-nymo

unread,
Jul 1, 2022, 8:32:11 AM7/1/22
to AWX Project
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

AWX Project

unread,
Jul 6, 2022, 4:13:09 PM7/6/22
to AWX Project
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

Hiero-nymo

unread,
Jul 8, 2022, 11:15:50 AM7/8/22
to AWX Project
Hi
Thanks but I'm using as you said k3s. Is this a solution with that?
Hiero-nymo

Wei-Yen Tan

unread,
Jul 8, 2022, 12:33:48 PM7/8/22
to awx-p...@googlegroups.com
Yoy can use kubectl Exec into the awx-Web container 

From: awx-p...@googlegroups.com <awx-p...@googlegroups.com> on behalf of Hiero-nymo <jer.m...@gmail.com>
Sent: Saturday, July 9, 2022 3:15:49 AM
To: AWX Project <awx-p...@googlegroups.com>
Subject: Re: [awx-project] Re: [AWX 19.5] - password for awx superuser container
 

kurokobo

unread,
Jul 10, 2022, 8:17:36 AM7/10/22
to awx-p...@googlegroups.com
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 <unique-name> --user 0 <container-id> bash

e.g.

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

You can get <container-id> by "kubectl -n awx describe pod <pod-name>"; 

$ kubectl -n awx describe pod awx-76445c946f-btfzz
...
  awx-task:
    Container ID:  containerd://c2db413be4684979c9055c788f751c676b8c898d33582c5fa7dbeeef8ec8fb22
...


--
@kurokobo

------- Original Message -------

Shubha Shivanna

unread,
Feb 17, 2023, 7:02:19 AM2/17/23
to AWX Project
i am having same question, can anyone help ?
trying to install tcpdump 

>> kubectl exec -i -t <pod name> -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:

AWX Project

unread,
Feb 17, 2023, 12:39:01 PM2/17/23
to AWX Project
@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

Shubha Shivanna

unread,
Feb 21, 2023, 3:55:56 AM2/21/23
to AWX Project
tanq u. lemme chk to install in the new image
Reply all
Reply to author
Forward
0 new messages