Removing FreeNAS functionality

Status
Not open for further replies.

philious77

Dabbler
Joined
Apr 17, 2015
Messages
10
I'm building some low end storage for a friend's small business and he's the kind of guy who likes to mess around with computers and then call me for support. While its inevitable that I will have to give him the root credentials for the FreeNAS web UI, I want to restrict what he can and cannot do.

My understanding is that there are no user roles in FreeNAS. Is there a way to "Hide" (comment out lines in html or python files, etc) certain features that I don't want shown (such as System-->Update, Jails) etc etc?

I don't care about the functions being there, but I just want them hidden from the UI to make it simpler.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Not in any way that's supported.

FreeNAS 10 moves to a very different module which should be able to do this.
 

philious77

Dabbler
Joined
Apr 17, 2015
Messages
10
Not really looking for support -- there must be a line of code I can comment out which will hide the box/option in question.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I have no doubt you can do this yourself, but I'd say its totally not only not supported, but I'm not sure I'd even recommend it. In all honesty, he can go to the command line from the WebGUI, so he can do so much damage there you're better off making it very painful for him if he breaks the system. Something like "if you call me because your system is broken, you're paying me $200 to fix it" and let him drown himself with stupid mistakes.

Literally, there's so many ways he could hang himself in the WebGUI that you cannot possibly disable enough of the WebGUI to save someone from being stupid. I'd either deny him WebGUI access completely,or make him pay for his mistakes.
 

philious77

Dabbler
Joined
Apr 17, 2015
Messages
10
I was able to remove some of the more dangerous features simply by commenting out some lines in various html files (such as System-->Update). This is no problem and works perfectly.

What I can't figure out is how to remove the Jails and Plugins sections as they seem to be generated dynamically (?). I'd like to keep the Reporting.

I know it's not supported, but can someone please advise how I can do this (via PM, if you like)? Also, how could I remove it from the left menu as well?
 

iSCSIinitiator

Dabbler
Joined
Jul 17, 2014
Messages
16
Philious77, I understand your concerns and motivations (I have some similar challenges) and I hope that you are able to work out a successful solution. I did want to mention that the approach that I took (which is admittedly a lot of work - I'm still coding) was to create a custom web GUI running on a VM in a jail that exposes specific functions to end users and then to use the FreeNAS REST API to execute operations/retrieve status data from the unaltered FreeNAS web GUI. Users have access to my custom web GUI but not FreeNAS' directly (this lets me implement roles, etc.). I share the concerns that Cyberjock mentioned about modifying the base FreeNAS web GUI code. I'd also add that there is the potential that quickly modifying the FreeNAS code might make a normally benign operation in FreeNAS' GUI break something because code that you blocked out was needed.

Best of luck however you decide to proceed.
 

philious77

Dabbler
Joined
Apr 17, 2015
Messages
10
iSCSIinitiator,

Your programming kung-fu is stronger than mine. I'm not in a position to reprogram the WebUI but I know that simply removing unneeded features should be easy. I really like freenas and I can only assume that the inability to remove the more bleeding-edge features is there to protect TrueNAS.

"It's not supported"....of course it's not! I'm not asking for support. I just want to comment out the features that I know for a fact will make it that much easier for someone to blow up their system.
 
Status
Not open for further replies.
Top