Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudo Issue with Cask Installed Item #102

Open
allebone opened this issue May 13, 2024 · 3 comments
Open

Sudo Issue with Cask Installed Item #102

allebone opened this issue May 13, 2024 · 3 comments

Comments

@allebone
Copy link

When Installing Tenable Nessus Agent via Cask, Exit 1 Error Occurs.

Text Output as Follows: failed: [*REPLACEDHOSTNAME*] (item=tenable-nessus-agent) => {"ansible_loop_var": "item", "changed": false, "item": "tenable-nessus-agent", "msg": "sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper\nsudo: a password is required\nError: Failure while executing; /usr/bin/sudo -u root -E LOGNAME=omni_admin USER=omni_admin USERNAME=omni_admin -- /usr/sbin/installer -pkg /opt/homebrew/Caskroom/tenable-nessus-agent/10.6.3,22994/Install\ Nessus\ Agent.pkg -target / exited with 1. Here's the output:\nsudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper\nsudo: a password is required"}

Google Chrome Succeeds Install in Same Order and Config.

Attempted Install with both become:yes and without.

@guruevi
Copy link
Contributor

guruevi commented Aug 11, 2024

Seems to be a duplicate of geerlingguy/ansible-role-homebrew#73

The problem is that the package is requesting sudo. This is a problem with the specific package, not homebrew. There are options such as specifying SUDO_ASKPASS variable with a script that returns the password.

@guruevi
Copy link
Contributor

guruevi commented Aug 21, 2024

https://docs.ansible.com/ansible/latest/collections/community/general/homebrew_cask_module.html

There is a sudo_password that can be passed to the community.general.homebrew_cask module. This fixes the issue with Tenable. It will be available in /Library/NessusAgent/run/sbin/nessuscli

@allebone
Copy link
Author

Thank You! I'll check it out, appreciate it!

BTW new Nessus Scanner is Apple Silicon optimized now WHEW its fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants