Command not found

Hello,

When I try to use any commands from the documention: https://docs.hestiacp.com/cli_commands/panel_configuration_commands.html I keep getting “bash: v-check-user-password: command not found” for example.

I have “/usr/local/hestia/bin” in my $PATH, but why does it keep saying command not found?

Latest version of HestiaCP
Debian 10

Did you login into the server from a different ssh account?

Just checked when I login with my non root account…

**eris@cp** : **~** $ bash v-change-user-password
/usr/local/hestia/bin/v-change-user-password: line 18: /usr/local/hestia/conf/hestia.conf: Permission denied

Usage: v-change-user-password USER PASSWORD

/usr/local/hestia/func/main.sh: line 73: /usr/local/hestia/log/error.log: Permission denied

**eris@cp** : **~** $ sudo -s

root@cp:/home/eris# v-change-user-password

v-change-user-password: command not found

And on a different server where I use root to login in…
root@cp:~# bash v-change-user-password
Usage: v-change-user-password USER PASSWORD

You can always use /usr/local/hestia/bin/v-change-user-password

1 Like

Hello @SFN , try switching to the root user using sudo su -, all cli cmds should be available in your path after

2 Likes

Same thing with root.

root@debianmach:~# v-change-user-password
bash: v-change-user-password: command not found

As a normal user without sudo:

/usr/local/hestia/bin/v-change-user-password: line 18: /usr/local/hestia/conf/hestia.conf: Permission denied
Usage: v-change-user-password USER PASSWORD
/usr/local/hestia/func/main.sh: line 73: /usr/local/hestia/log/error.log: Permission denied

With sudo: “sudo: v-change-user-password: command not found”

If you add the following lines in /root/.bashrc

if [ "${PATH#*/usr/local/hestia/bin*}" = "$PATH" ]; then
. /etc/profile.d/hestia.sh
fi

It will work when you login with sudo -s

For sudo command:

Alter the secure_path variable

Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

to

Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/hestia/bin"

thanks to @Lupu how ever no guarantees given and on your own risk…

2 Likes

I have succeeded by typing the whole path:
example:
/usr/local/hestia/bin/v-rebuild-users

1 Like

Excellent! simple, and it works.

1 Like