Ad Widget

Collapse

detect operating system not working error. sudo: a terminal is required

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 234233214
    Junior Member
    • Nov 2022
    • 15

    #1

    detect operating system not working error. sudo: a terminal is required

    Hello,

    Very new to Zabbix, currently installed and setup Zabbix server and agent on 2 VMs for testing. I have been able to do the setup and login to the dashboard. I have added the agent host to the dashboard and its availability status is stuck at unknown. I found online that it would become available once the 3 tests (Detect Operating System, Ping and Traceroute would work). I managed to make ping and traceroute work by installing nmap, traceroute and enabling their use by zabbix in selinux policies. However, I'm not able to make 'Detect Operating System' work.
    I get the following error when I run it:

    Cannot execute script.

    We trust you have received the usual lecture from the local System
    Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

    sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
    I have added `zabbix ALL=(ALL) NOPASSWD: ALL` to visudo and don't see any logs in /var/log/audit/audit.log so I don't think selinux is stopping the execution. I can run the command
    Code:
    sudo nmap -O <agent_IP>
    with my local user in zabbix server. But I cannot use the zabbix user. I get the following error when I try it:
    Code:
    sudo su - zabbix
    su: warning: cannot change directory to /var/lib/zabbix: No such file or directory
    This account is currently not available.
    System Information: Rocky Linux 8.6
    DB: Postgresql 13
    Zabbix: 6.0

    Please help with this issue and let me know what further info I need to provide regarding this.

    Thanks,
  • swordfish77
    Junior Member
    • Feb 2025
    • 3

    #2
    New to Zabbix. I try to choose between Zabbix and Checkmk.
    Nobody figure out about this problem? 2025 and still receive this error at fresh install. On Reddit many people said that zabbix ALL=(ALL) NOPASSWD: ALL is not ok to be applied. So what we have to do? Thank you

    Comment

    • sysadmin99
      Junior Member
      • Mar 2025
      • 1

      #3
      Originally posted by swordfish77
      New to Zabbix. I try to choose between Zabbix and Checkmk.
      Nobody figure out about this problem? 2025 and still receive this error at fresh install. On Reddit many people said that zabbix ALL=(ALL) NOPASSWD: ALL is not ok to be applied. So what we have to do? Thank you
      Found this solution https://ixnfo.com/en/solution-of-err...in-zabbix.html

      Worked great for me. Running on Debian 12, Zabbix version 7.2.4

      Comment

      Working...