-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow sudo selfcontrol-cli to start a block without reinstalling selfcontrold #893
Comments
This is the small hack I'm trying to get working,
The only hurdle is I don't have an Apple Developer Account and cannot sign the binaries with TeamIdentity setting to a real Developer ID, so I always get the following error:
|
If there's interest in pursuing this direction, I'm happy to help out. |
@EternalDebugger Did you have any issues with Sentry when you were coming up with the hack for this issue? I've been trying to fix a couple bugs that have been ruining my personal experience with SelfControl, as you can see here. However, I'm unable to get past the issues I'm having with Sentry. This is for a work computer so SelfControl is the only approved option I can use. I don't have an Apple Developer account either so I'll probably face the same XPC issue that you are at some point. It's unfortunate that there's no longer any support from the original devs so even if a PR was put out, I doubt it would get merged in. |
Is your feature request related to a problem? Please describe.
I'm testing a use case where the main user of the Mac Laptop is a Standard user, and is not supposed to have admin password. I'd like this user can still trigger a block without entering the admin password, as the user is not supposed to know it.
The approach I'd like to use is to grant this user access to
sudo selfcontrol-cli
without password via sudoers file. This will also allow selfcontrol-cli to calllaunchctl load
as superuser. Given that/Library/PrivilegedHelperTools/org.eyebeam.selfcontrold
should already be installed, this can smooth the experience as it can avoid the unnecessary privilege escalation dialog which requires admin password. It will also allow cronjob to automatically schedule blocks, fulfilling one of the most requested features in this repo.The following is the sudoers file I'm testing with:
There are two hurdles I ran into with this approach:
INACTIVITY_LIMIT_SECS = 60 * 60 * 24 * 365 * 10
inDaemon/SCDaemon.m
and rebuild selfcontrold.SMJobRemove
andSMJobBless
, both will require privilege escalation dialog and admin password, hence defeating the purpose of what I want to achieve.Is there a way to avoid calling installDaemon function but still allow selfcontrol-cli to start a blocking session?
The text was updated successfully, but these errors were encountered: