# enhanced korn shell to switch to root user

**URL:** <https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224>\
**Category:** Ansible Project\
**Created:** [November 23, 2020, 11:39am UTC](https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224 "2020-11-23T11:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyal\_Patil](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@Priyal\_Patil](https://forum.ansible.com/u/Priyal_Patil)\
**Post date:** [November 23, 2020, 11:39am UTC](https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224/1 "2020-11-23T11:39:39Z")

</div>

Hi,

Anyone knows if this can be achieved to to become root user thorugh, if we are using EKSH.

sudo /usr/localcw/bin/eksh

Regards  
Priyal Patil

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [November 23, 2020, 11:47am UTC](https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224/2 "2020-11-23T11:47:44Z")

</div>

If you are planning to use it as part of a “shell” module, this provides an attribute to specify the shell to be used.

The attribute for the module is “executable”.

[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/shell\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/shell_module.html)

---

<div class="post-metadata">

**Author:** ![Priyal\_Patil](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@Priyal\_Patil](https://forum.ansible.com/u/Priyal_Patil)\
**Post date:** [November 25, 2020, 6:19pm UTC](https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224/3 "2020-11-25T18:19:14Z")

</div>

Hi,

I wanted to use with other modules like yum  
Regards  
Priyal Patil

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [November 25, 2020, 6:53pm UTC](https://forum.ansible.com/t/enhanced-korn-shell-to-switch-to-root-user/34224/4 "2020-11-25T18:53:50Z")

</div>

I’m maybe wrong, but it is my understanding that ansible modules don’t use a shell underneath (except the shell module).

If you want to use a task to remotely run a command, you should use the shell/command module.
