-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cannot use non-admin account: Invalid privilege level user #16
Comments
Huh, this double-whitespace seemed suspicius:
So, when I went with I guess there's some shell-quoting happening on the PHP side and the command ends up as |
I'm using a library to run the commands. Here is the code that creates the command line. |
So basically, you're passing the whole diff --git a/ipmi-server/rootfs/app/src/Controller/IpmiController.php b/ipmi-server/rootfs/app/src/Controller/IpmiController.php
index db1aa6b..93830cc 100644
--- a/ipmi-server/rootfs/app/src/Controller/IpmiController.php
+++ b/ipmi-server/rootfs/app/src/Controller/IpmiController.php
@@ -204,7 +204,8 @@ class IpmiController
}
if (!empty($extra)) {
- $cmd[] = $extra;
+ $extra_cmd = str_getcsv($extra, ' ', '"', '');
+ $cmd = array_merge($cmd, $extra_cmd);
}
return $cmd; |
I'm trying to use a read-only IPMI account with this addon, like this:
However, when I SSH into my "real" HassOS and
docker exec -it addon_304fecf0_ipmi-server bash
and from inside the addon I run/usr/sbin/ipmitool -H 10.0.0.13 -p 623 -U MY_USER -P MY_PASS -L user -I lanplus bmc info
- it works OK.Any ideas on how to fix this?
The text was updated successfully, but these errors were encountered: