Protect shutdown/reboot Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Protect shutdown/reboot

Post by sciurius »

I have domiticz running on a server. Under the Settings menu, I can shutdown and reboot the system. This is, of course, not desired for a server.
Can I somehow protect these menu items from being triggered by accident?

I can set Light/Switch Protection but there's no such thing for Shutdown/Reboot.
User avatar
waltervl
Posts: 6689
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Protect shutdown/reboot

Post by waltervl »

If you setup users only an admin can shutdown/reboot the server. Uses and viewers cannot.
https://www.domoticz.com/wiki/User_Management
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
FireWizard
Posts: 1968
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Protect shutdown/reboot

Post by FireWizard »

Hi, @sciurius,

Perhaps this solution is also for you:

See: viewtopic.php?t=9501

Regards
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Re: Protect shutdown/reboot

Post by sciurius »

Thanks, @FireWizard. This may be a better approach.

(Although I agree with one of the last posters who suggest '[to] change the functionality of the Shutdown system so that it just stops the Domoticz service rather than shutdown the entire Pi.')
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Protect shutdown/reboot

Post by EddyG »

All those commands (reboot / shutdown etc...) are symlinks to /sbin/systemctl
Just delete the symlinks or point the symlinks to something else and in the future use

Code: Select all

/sbin/systemctl reboot
/sbin/systemctl shutdown
See

Code: Select all

/sbin/systemctl --help
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest