{"action":"created","issue":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/707","labels_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/707/comments","events_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/707/events","html_url":"https://github.com/Hammerspoon/hammerspoon/issues/707","id":124550564,"number":707,"title":"Time Machine controls / hs.task() sudo capability","user":{"login":"herrbischoff","id":8957346,"avatar_url":"https://avatars.githubusercontent.com/u/8957346?v=3","gravatar_id":"","url":"https://api.github.com/users/herrbischoff","html_url":"https://github.com/herrbischoff","followers_url":"https://api.github.com/users/herrbischoff/followers","following_url":"https://api.github.com/users/herrbischoff/following{/other_user}","gists_url":"https://api.github.com/users/herrbischoff/gists{/gist_id}","starred_url":"https://api.github.com/users/herrbischoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herrbischoff/subscriptions","organizations_url":"https://api.github.com/users/herrbischoff/orgs","repos_url":"https://api.github.com/users/herrbischoff/repos","events_url":"https://api.github.com/users/herrbischoff/events{/privacy}","received_events_url":"https://api.github.com/users/herrbischoff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-01T16:51:47Z","updated_at":"2016-01-04T21:47:53Z","closed_at":"2016-01-04T21:47:53Z","body":"Today I have moved from ControlPlane to Hammerspoon and will not look back. Another GUI application rendered unnecessary — I love it!\r\n\r\nSo far however, I have been unsuccessful in duplicating a simple disable/enable Time Machine function for Hammerspoon. This is, I suspect, due to `hs.task()` being unable to run tasks as root. To change the current Time Machine status you need root privileges.\r\n\r\nIs there possibly something I overlooked? Searching through the API reference and closed issues here did not reveal anything resembling my approach. I'll appreciate any pointers. Thanks!"},"comment":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/comments/168820384","html_url":"https://github.com/Hammerspoon/hammerspoon/issues/707#issuecomment-168820384","issue_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/707","id":168820384,"user":{"login":"cmsj","id":353427,"avatar_url":"https://avatars.githubusercontent.com/u/353427?v=3","gravatar_id":"","url":"https://api.github.com/users/cmsj","html_url":"https://github.com/cmsj","followers_url":"https://api.github.com/users/cmsj/followers","following_url":"https://api.github.com/users/cmsj/following{/other_user}","gists_url":"https://api.github.com/users/cmsj/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsj/subscriptions","organizations_url":"https://api.github.com/users/cmsj/orgs","repos_url":"https://api.github.com/users/cmsj/repos","events_url":"https://api.github.com/users/cmsj/events{/privacy}","received_events_url":"https://api.github.com/users/cmsj/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T21:47:53Z","updated_at":"2016-01-04T21:47:53Z","body":"So, looking at the Control Plane source, they have a Helper Tool, which is a separate process from the main app, authorised to run as root. I don't currently think this is something we're considering doing (it certainly makes me very nervous, security-wise!), so I'm going to close out this issue with the recommendation that you use the sudoers method I outlined for giving yourself passwordless sudo access to the specific commands you need.\r\nIf anyone wants to disagree, please feel free to re-open this issue, or start a new one for discussions of a helper tool :)"}}