Score:1

Zeek 'command not found: zeekctl'

vi flag

I installed zeek on Ubuntu, I did this previously on a previous install; but even though I go to the directory /opt/zeek to initiate and run zeek with the command 'zeekctl start', but I am prompted with the output:

[ZeekControl] > install 

........I even tried to follow this guide, but zeekctl gives the same output. [ZeekControl] > install without jumping into zeekctl gives the output bash: install: Permission denied; even when I use sudo [ZeekControl] > install....so sudo doesn't seem to affect it.

Zeekctl.cfg is in fact located in the directory /opt/zeek/etc as discovered by me running the ls command, but even though I jumped into the directory, it is still claiming that zeekctl is not found as a command....as for zeekctl as a whole and where it would be located if it existed, i'm not sure...i'm not even sure if it exists in zeek. I assume it does if a config file exists for it, but it's still being expressed as not found.

Any ideas on how to fix this?

ru flag
The redirect `>` is not encapsulated in the sudo call. You may need to run `sudo su -c '[ZeekControl] > install'` to make this function. This can be dangerous as it runs the entire command as superuser including the redirect. So tread lightly when using this form of superuser escalation for privileges
Jess el avatar
vi flag
Thanks for the clarification. Running that command gives the output, 'bash: line 1: [ZeekControl]: command not found', so I think we cannot remediate the issue until zeekctl has been installed and can be jumped into via terminal. That said...any idea on how to get zeekctl to appear as a command?
ru flag
it needs to be added to `PATH`, but you can refer to `zeekctl` with `./zeekctl` if you're *in* the directory it's present in.
Jess el avatar
vi flag
'./zeekctl start' gives the output 'bash: ./zeekctl: no such file directory'...is there a guide on how I can add zeekctl to path? I should probably note that what is located in /opt/zeek/etc is called 'zeekctl.cfg' which is a config file....so i'm not even sure if zeekctl exists or where it would exist at all.
hr flag
If the configuration file is in `/opt/zeek/etc`, then a logical place to look for an executable file would be `/opt/zeek/bin` - so I'd try `/opt/zeek/bin/zeekctl`. So far as I can see, `[ZeekControl] >` is meant to represent a *prompt* that you should see **after** you enter an *interactive* zeek session using the `zeekctl` command
Jess el avatar
vi flag
You are correct, it is located in bin. So I went to the file directory '/opt/zeek/bin' and ran zeekctl start; but still got the output 'zeekctl: command not found'....I tried to enter the directory /opt/zeek/bin/zeekctl, but it gave the output 'bash: cd: /opt/zeek/bin/zeekctl: Not a directory'. I also tried the command zeekctl and it gave the output 'zeekctl: command not found'. Why is it saying that zeekctl doesn't exist when i'm in the bin directory where it's located, confirmed by ls? Why can I not enter zeekctl's directory when it's appearing in ls?
hr flag
If `./` is not in your `PATH`, then simply being in the directory makes no difference - please try typing **exactly** `/opt/zeek/bin/zeekctl` at the bash prompt (not `cd /opt/zeek/bin/zeekctl` or any other variant)
Jess el avatar
vi flag
Scratch that, it worked. I just had to enter sudo. Now starting zeek gives the output 'Error: zeek terminated immediately after starting; check output with "diag" '. Any idea why this is? EDIT: Another scratch to previous note; I had to run install command in [ZeekControl]....it appears to be running just fine. I will come back with any other inquiries should they arise. Thank you for your help, steeldriver.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.