[luci] LUCI JSON RPC call to other user than root

Hanno Schupp hanno.schupp at gmail.com
Thu Jul 4 13:49:51 CEST 2013


Hi,

 

I have figured out to call luci json rpc api successfully, authenticate and
then use the various libraries to make remote configuration changes using
the uci library or run system commands using the sys library. So far so
good. 

 

It appears though that the user  has to be root. To get a response from the
sys or uci libraries. I have created a secondary admin user (yes, same
privileges as root) in /etc/passwd and shadow password and I can log on with
that user fine using ssh/commandline, and with the described change in here:
https://forum.openwrt.org/viewtopic.php?pid=163013#p163013 even using LUCI.
Still, while the call to /cgi-bin/luci/rpc/auth does give me a valid auth
token, I cannot use it to perform any actions. As soon as I use the root
user for the same actions, the calls work.

 

Question I have is whether there is a simple code change analogous to the
one described in the link above (which enables the alternative user access
for the GUI) also possible to enable JSON RPC API calls using alternative
user? 

Can anyone provide a hint?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20130704/8cdb35b5/attachment.html>


More information about the luci mailing list