Running mbmon in jail requires setuid

Status
Not open for further replies.

erikiiofph7

Dabbler
Joined
Oct 10, 2013
Messages
15
I created a jail and installed mbmon in it, but it won't run:
Code:
root@jail1:/ # mbmon -r -c 1                                                  
InitMBInfo: Operation not permitted                                            
This program needs "setuid root"!!                                            
root@jail1:/ #                                                                

So I checked the permissions for mbmon:
Code:
root@jail1:/ # ls -l /usr/local/bin/mbmon                                      
-r-sr-xr-x  1 root  wheel  51104 Jul 27 05:23 /usr/local/bin/mbmon            
root@jail1:/ #                                                               

Is it some other file that needs setuid root?
I tried to see if there is a file called InitMBInfo, but I didn't find any. At least not using "which"...
 
Last edited by a moderator:
D

dlavigne

Guest
Unfortunately this won't work in a jail as it requires direct access to the hardware.

What exact info are you trying to gather? It may be available through sysctl.
 

erikiiofph7

Dabbler
Joined
Oct 10, 2013
Messages
15
Unfortunately this won't work in a jail as it requires direct access to the hardware.

What exact info are you trying to gather? It may be available through sysctl.
CPU fan speed was what I wanted to see. I'm also interested in temperatures, but I can get those from sysctl. Tried to find the fan speed in the sysctl output as well but didn't find any...
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
As far as I know, there are no sysctls for fan speed.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Fan speed? You're looking for ipmitool. The X10/X11 FAQ linked in my sig has a link to a guide that should help.
 

erikiiofph7

Dabbler
Joined
Oct 10, 2013
Messages
15
Fan speed? You're looking for ipmitool. The X10/X11 FAQ linked in my sig has a link to a guide that should help.
I tried ipmitool now, but I don't get it to work.
ipmi.ko is listed in the kldstat output so it seems to be loaded.
But when I checked the dmesg output it seems that there are dependencies missing. What dependencies could that be?
Running these commands in the real system instead of the jail didn't make any difference, still same output.
root@jail1:/ # ipmitool sensor list all
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
root@jail1:/ # kldstat | grep -i ipmi
21 1 0xffffffff82121000 7fc1 ipmi.ko
root@jail1:/ # dmesg | grep -i ipmi
KLD file ipmi.ko is missing dependencies
root@jail1:/ #
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'm fairly certain you can't run it in the jail, but it's included with FreeNAS.
 

erikiiofph7

Dabbler
Joined
Oct 10, 2013
Messages
15
I'm fairly certain you can't run it in the jail, but it's included with FreeNAS.
I can't run it in the base system either, I get the same error / output, and the same note about the missing dependencies. But what dependency? It doesn't say...
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What's the hardware?
 

erikiiofph7

Dabbler
Joined
Oct 10, 2013
Messages
15
What's the hardware?
My main FreeNAS unit has an Asrock E350M1 motherboard. Then I also have a temporary FreeNAS install on a computer with a Gigabyte GA-Z77MX-D3H motherboard.

Both have the same problem complaining about "Could not open device...".
Both show ipmi in the kldstat output.
However, on the Asrock the dmesg doesn't mention ipmi at all, only the temporary install complains about the dependencies. weird.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Well, there's your problem, neither of them has IPMI.
 
Status
Not open for further replies.
Top