# Potential Issue with privilege escalation for ldap accounts

**URL:** <https://forum.ansible.com/t/potential-issue-with-privilege-escalation-for-ldap-accounts/34412>\
**Category:** Ansible Project\
**Created:** [January 8, 2021, 10:33am UTC](https://forum.ansible.com/t/potential-issue-with-privilege-escalation-for-ldap-accounts/34412 "2021-01-08T10:33:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NARAYANA\_RAO](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@NARAYANA\_RAO](https://forum.ansible.com/u/NARAYANA_RAO)\
**Post date:** [January 8, 2021, 10:33am UTC](https://forum.ansible.com/t/potential-issue-with-privilege-escalation-for-ldap-accounts/34412/1 "2021-01-08T10:33:06Z")

</div>

Hi There! On unix platform, ansible privilege escalation to “root” account from a ldap connected account seems to have an issue for password less “sudo su - root” setup.

I get the following error when ldap account tries to “sudo su - root” (with become:yes) setting.

failed: [hostname] (item={‘failed’: False, u’stat’: {u’exists’: False}, ‘ansible\_loop\_var’: u’item’, ‘item’: u’/apache/2.4.46’, u’invocation’: {u’module\_args’: {u’follow’: False, u’get\_checksum’: True, u’path’: u’apache/2.4.46’, u’checksum\_algorithm’: u’sha1’, u’get\_md5’: False, u’get\_mime’: True, u’get\_attributes’: True}}, u’changed’: False}) =\> {“ansible\_loop\_var”: “item”, “changed”: false, “item”: {“ansible\_loop\_var”: “item”, “changed”: false, “failed”: false, “invocation”: {“module\_args”: {“checksum\_algorithm”: “sha1”, “follow”: false, “get\_attributes”: true, “get\_checksum”: true, “get\_md5”: false, “get\_mime”: true, “path”: “/apache/2.4.46”}}, “item”: “/apache/2.4.46”, “stat”: {“exists”: false}}, “module\_stderr”: “Shared connection to closed.\r\n”, “module\_stdout”: “\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

with password mode it works fine.

However with local accounts, this isn’t an issue even with or without password.

Can some one please suggest. TIA.

-N
