# Community.general.shutdown Interactive authentication required

**URL:** <https://forum.ansible.com/t/community-general-shutdown-interactive-authentication-required/1728>\
**Category:** Get Help\
**Tags:** shutdown, playbook, collections, ubuntu\
**Created:** [October 16, 2023, 12:49am UTC](https://forum.ansible.com/t/community-general-shutdown-interactive-authentication-required/1728 "2023-10-16T00:49:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [October 16, 2023, 8:43pm UTC](https://forum.ansible.com/t/community-general-shutdown-interactive-authentication-required/1728/4 "2023-10-16T20:43:24Z")

</div>

> [@charlespick](#):
>
> I’d rather configure the server to allow this user to shutdown the computer without password authentication.

Yeah, that’s the key. It’s not Ansible-specific. The way you do that is to create a file in `/etc/sudoers.d`, say `/etc/sudoers.d/15-thisuser` that looks like this:

```sh
thisuser ALL=(ALL) NOPASSWD: /usr/bin/systemctl poweroff
Defaults:thisuser !requiretty

```

That will allow `thisuser` to run `sudo /usr/bin/systemctl poweroff` without a password.

More generally, a site designates an id (say, `ansible-unchained`) for running Ansible on the managed nodes, sets up public/private key pairs for that id, and enables that id with full password-less `sudo` capability via `/etc/sudoers.d/<somenumber>-ansible-unchained` that contains:

```sh
ansible-unchained ALL=(ALL) NOPASSWD:ALL

```

If you do that, understand and track that private key to the max: it is literally the _key to your kingdom_.

---

_[View the full topic](https://forum.ansible.com/t/community-general-shutdown-interactive-authentication-required/1728)._
