jacklandrin/OnlySwitch

Clamshell without user password

Opened this issue · 5 comments

Challenge
Currently the Clamshell Evolution script requires you to enter your password every time. My password requirements are extremely long so this is a challenge.

Feature request
Remove the password requirements

Workaround
I have found a workaround by editing the sudoers file for the pmset command. That is not very user friendly though. For this workaround I did the following;

  1. Follow the instructions here to add pmset to the sudoers file
    your_short_username ALL=NOPASSWD: /usr/bin/pmset
  2. Edit the Clamsell Evolution script to remove the "as administrator" setting
    do shell script "sudo pmset -a disablesleep 1"

Other solutions
OneSwitch has a solution for this and seems to be able to handle it

You also can edit Clamshell commands to add your password like:

do shell script "sudo pmset -a disablesleep 1" with prompt "OnlySwitch" with administrator privileges password "xxxxx"

It wouldn't ask for the password every time.

The most concerning thing about that is having my password randomly stored in plain text somewhere, but good to be aware of as an option.

An alternative way is like OneSwitch, which lets users install a help tool to store account passwords to keychain. It would be safer than in plain.

Is that something I can do, or requires a change to OnlySwitch?

I will investigate how to implement it and add it on my side.