Thank you for your donation!


Instruction Guide Modding moOde: restrict access to config pages
#11
Hi,
You need to run this command first:

Code:
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "DROP TRIGGER ro_columns"
Reply
#12
(05-31-2019, 07:56 AM)TookaFace Wrote: Hi,
You need to run this command first:

Code:
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "DROP TRIGGER ro_columns"

Thank you - everything working as expected again.
Reply
#13
(05-29-2019, 07:25 AM)ksone Wrote:
(04-24-2019, 12:52 PM)ksone Wrote:
(04-24-2019, 09:22 AM)TookaFace Wrote: 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'"

@TookaFace THANK YOU - working like a charm again Smile

Code:
M O O D E    L O G  

   20190424 144854 worker: - Start
   20190424 144854 worker: Successfully daemonized
   20190424 144854 worker: Integrity check (warning: nginx.conf)
   20190424 144854 worker: Integrity check (passed with warnings)
   …...
   20190424 144942 worker: Watchdog started
   20190424 144942 worker: Ready

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.



Hi,

Did you update the code to match PHP version from the mo0de release you're running?

I've installed mo0de yesterday for the first time, so I'm not familiar with previous versions, but mine (release 6.2.0 2019-09-05) is running PHP 7.3, so I updated the line to match it:

Code:
fastcgi_pass unix:/run/php/php7.3-fpm.sock;


Didn't have to update anything in the database.


UPDATE 1: I rebooted mo0de, and it's not working; I get the same result as you: Integrity check (failed), MPD connect failed, DB read-only. :/

UPDATE 2: TookaFace's solution with DROP TRIGGER works! Thanks!
Reply
#14
(09-08-2019, 01:54 PM)madodig Wrote: Hi,

Did you update the code to match PHP version from the mo0de release you're running?

I've installed mo0de yesterday for the first time, so I'm not familiar with previous versions, but mine (release 6.2.0 2019-09-05) is running PHP 7.3, so I updated the line to match it:

Code:
fastcgi_pass unix:/run/php/php7.3-fpm.sock;


Didn't have to update anything in the database.


UPDATE 1: I rebooted mo0de, and it's not working; I get the same result as you: Integrity check (failed), MPD connect failed, DB read-only. :/

UPDATE 2: TookaFace's solution with DROP TRIGGER works! Thanks!

The DROP TRIGGER solution and updating the code to refer to php7.3 will do the trick.
Remember that the amount of restricted config pages have increased after the post were first started. 

Code:
location ~ /(apl|blu|chp|eqg|eqp|lib|lop|gpio|mpd|net|sel|snd|spo|sqe|sys|upp)\-config.php$ {

Regards
Reply
#15
Hi,

I like to change the settings with a simple password, does anyone can help me with this, it seems that a simple editor
does not work.

thanks
Reply
#16
(05-31-2019, 07:56 AM)TookaFace Wrote: Hi,
You need to run this command first:

Code:
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "DROP TRIGGER ro_columns"
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "UPDATE cfg_hash SET ACTION = 'warning' WHERE PARAM = '/etc/nginx/nginx.conf'"

Hi @TookaFace, have you updated to 6.4.1?

Tim wrote this in the patch notes:
- UPD: Improve system integrity checking


The previous workaround is no longer working. In fact the workaround kill the player.
Tim have updated the integrity checks; and typing the 2 lines above will leave the rpi non functional… 

I can SSH into the player and logs shows this :
worker: -- Start
worker: Successfully daemonized
worker: Integrity check (failed:1)
worker: Exited
moode.php: MPD connect failed: cmd=(playlist)

and nothing works :/

Good thing I made a backup of the sd card first Smile
Reply
#17
Hey, you can follow the \\ ONLY FOR 6.4.1 part, that should work

http://moodeaudio.org/forum/showthread.php?tid=1938
Reply
#18
(02-03-2020, 03:59 PM)TookaFace Wrote: Hey, you can follow the \\ ONLY FOR 6.4.1 part, that should work

http://moodeaudio.org/forum/showthread.php?tid=1938

THANK YOU! It works like a charm. Smile
Reply
#19
I like the idea of password protecting the settings page, I'm hoping to use the player in a Vacation Rental
It wouldn't need to be super secure.  Popup modal box with password box that checks against plain text password or sqlite db

Current max alsa volume setting works great for rental scenario as well, though i think you have to change hardware vol to software vol for effective max vol control
Several piZeroW with HiFiBerry Amp2 and Allo Mini Boss DAC
Reply


Forum Jump: