[How to do instruction] Modding moOde: restrict access to config pages - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Modding moOde: restrict access to config pages (/showthread.php?tid=341) Pages:
1
2
|
Modding moOde: restrict access to config pages - Highsider - 07-22-2018 Hello, as I am using moOde in an environment, were others can use it to play their music, I added restricted access by editing nginx.conf (/etc/nginx/nginx.con) Just change: Code: ## to: Code: ## so that all *-config.php pages are password protected. You need a password file (/etc/nginx/htpasswd) which can easily be generated online (e.g. here) In my case I have a public and a private net (192.168.10.x) - this is excluded from password protection - this entry can be left out, if not necessary. Best regards Hans RE: Modding moOde: restrict access to config pages - Tim Curtis - 07-23-2018 Hi Hans, What the usage scenario where u need password protection? -Tim RE: Modding moOde: restrict access to config pages - Highsider - 07-23-2018 Hello Tim, the audioplayer is installed at a riding arena, were everyone can connect to an open WLAN. This WLAN (OpenWRT router) only allows acces to the moOde player and redirects all requests. So everyone, who connects to this WLAN can use the audioplayer. My problem was, that some users tried to figure out what they can do with moOde and even changed the network config... So I added password protection to avoid additional work for me :-) I think, this is a very specifific usecase. But perhaps it is usefull for peoply with curious kids. Even better would be a kiosk mode, which completly hides some menu entries... but didn't try to implement it, yet. RE: Modding moOde: restrict access to config pages - FizzyTea - 07-23-2018 (07-23-2018, 05:20 AM)Highsider Wrote: Hello Tim, I think this is pretty cool. I have a potential usage scenario in mind, a bit similar to Highsider's usage scenario, a guest-room audio player. Guests connect to a guest WLAN and can access the player but we don't want them to access and change settings. It's something I have previously briefly considered and this mod would make it viable. RE: Modding moOde: restrict access to config pages - TheOldPresbyope - 07-23-2018 (07-23-2018, 12:53 PM)FizzyTea Wrote:(07-23-2018, 05:20 AM)Highsider Wrote: ... Same here. I could use it as a music player for the high school drama club I mentor. I could patch a moOde player through the sound board. The weeks-long drudgery of constructing and painting sets would be lightened by music, especially if the kids get to choose tracks via moOde and my music service subscriptions. They're teenagers. If there's a way to screw up the configuration, they'll find it. Inveterate button pushers, all of them Regards, Kent RE: Modding moOde: restrict access to config pages - ksone - 04-23-2019 Hi @Tim Curtis, or other with more knowledge than I I'm using a modified version of the above pw protection. In last version I had to modify the integrity check on nginx.conf file, that was perfomed during boot. This I could do in worker.php (around line 123). With current version 5.0 - I fail to find the integrity check in worker.php - All I can see is that it have moved somewhere…. but not where. Modifying the nginx.conf will have it fail the integrity check(you can see that in moode.log) and it'll leave the mighty moode player dead (well mostly dead). I need to pw protect the config pages. Thank you RE: Modding moOde: restrict access to config pages - TookaFace - 04-24-2019 Hi, You need to change action to warning instead of exit for nginx.conf in moOde sqlite database: Code: sudo sqlite3 /var/local/www/db/moode-sqlite3.db "UPDATE cfg_hash SET ACTION = 'warning' WHERE PARAM = '/etc/nginx/nginx.conf'" RE: Modding moOde: restrict access to config pages - ksone - 04-24-2019 (04-24-2019, 09:22 AM)TookaFace Wrote: Hi, @TookaFace THANK YOU - working like a charm again Code: M O O D E L O G RE: Modding moOde: restrict access to config pages - ksone - 05-29-2019 (04-24-2019, 12:52 PM)ksone Wrote:(04-24-2019, 09:22 AM)TookaFace Wrote: Hi, For some reason after latest moode version it doesnt work anymore. When trying to run the sqlite line I get this: "Error: read only" And I can't figure out how to make the db file writeable. RE: Modding moOde: restrict access to config pages - TookaFace - 05-31-2019 Hi, You need to run this command first: Code: sudo sqlite3 /var/local/www/db/moode-sqlite3.db "DROP TRIGGER ro_columns" |