OnlySwitch icon indicating copy to clipboard operation
OnlySwitch copied to clipboard

Clamshell without user password

Open rabbly opened this issue 1 year ago • 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

rabbly avatar Nov 08 '23 16:11 rabbly

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.

jacklandrin avatar Nov 08 '23 16:11 jacklandrin

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.

rabbly avatar Nov 08 '23 17:11 rabbly

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.

jacklandrin avatar Nov 08 '23 20:11 jacklandrin

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

rabbly avatar Nov 09 '23 02:11 rabbly

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

jacklandrin avatar Nov 09 '23 06:11 jacklandrin