# error command not found in RHEL server and few are working

**URL:** <https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620>\
**Category:** Ansible Project\
**Tags:** rhel, awx\
**Created:** [February 5, 2023, 1:01am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620 "2023-02-05T01:01:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anish\_kumar2](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anish\_kumar2](https://forum.ansible.com/u/anish_kumar2)\
**Post date:** [February 5, 2023, 1:01am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/1 "2023-02-05T01:01:10Z")

</div>

am running the ansible playbook through AWX and its getting failed with the subjected error. I am able to run shell command on RHEL 7 from putty and its executed successfully. Few of the command from shell module i am able to run successfull same command is not running from ansible shell module  
Path is same set from putty as well as from shell module in ansible  
red hat RHEL 7.9

command :- pwd  
run from putty as well as shell moduel from ansible  
command :- groupInfo  
run from putty but getting error from ansible shell module when path and env is set

fatal: [localhost → 192.168.0.101]: FAILED! =\> {“changed”: t rue, “cmd”: “groupInfo”, “delta”: “0:00:00.082693”, “end”: “2023 -02-03 22:14:37.486677”, “msg”: “non-zero return code”, “rc”: 12 7, “start”: “2023-02-03 22:14:37.403984”, “stderr”: “/bin/sh: groupInfo: command not found”, “stderr\_lines”: [“/bin/sh: groupInf o: command not found”], “stdout”: “”, “stdout\_lines”: }

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 5, 2023, 1:28pm UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/2 "2023-02-05T13:28:13Z")

</div>

Asking the same question will get you the same answer: use the correct spelling and capitalisation.

And it’s all there in the error message. Please read that (really)

---

<div class="post-metadata">

**Author:** ![anish\_kumar2](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anish\_kumar2](https://forum.ansible.com/u/anish_kumar2)\
**Post date:** [February 5, 2023, 1:57pm UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/3 "2023-02-05T13:57:47Z")

</div>

I have tried with small keyword but no luck as well as caps

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [February 5, 2023, 7:52pm UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/4 "2023-02-05T19:52:39Z")

</div>

You say “Path is same set from putty as well as from shell module in ansible”. Convince us. Run the following through putty and then again through the ansible.builtin.shell module.

echo $PATH  
which groupinfo

---

<div class="post-metadata">

**Author:** ![lee](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lee/32/4857_2.png) [@lee](https://forum.ansible.com/u/lee)\
**Post date:** [February 6, 2023, 5:21am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/5 "2023-02-06T05:21:17Z")

</div>

The error message says  
“/bin/sh: grouplnfo: command not found”

I is capitalized in groupInfo.

@Dick Visser was trying to point that out I think.

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [February 6, 2023, 6:04pm UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37620/6 "2023-02-06T18:04:10Z")

</div>

> The error message says  
> "/bin/sh: grouplnfo: command not found"  
> I is capitalized in groupInfo.  
> @Dick Visser was trying to point that out I think.

There was a '%changelog" typo that only broke RHEL 8 based  
compilation. Do a "git pull" and try it now.

Nico Kadel-Garcia
