Skip to content
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

Support for sudo with tty-tickets enabled (MacOS Sierra by default) #39

Open
automation-stack opened this issue Nov 29, 2016 · 15 comments

Comments

@automation-stack
Copy link
Owner

https://derflounder.wordpress.com/2016/09/21/tty_tickets-option-now-on-by-default-for-macos-sierras-sudo-tool/

@automation-stack automation-stack changed the title Support for sudo with tty-tickets enabled (MacOS Sierra by default) Support for sudo with tty-tickets enabled (MacOS Sierra by default) Nov 29, 2016
@ZackMattor
Copy link

ZackMattor commented Jan 31, 2017

Hello! Just want to check if this is the issue i'm hitting. I have a simple app just trying to test out electron-sudo. Here is my code and the output. Running on MacOS Sierra.

var Sudoer = require('electron-sudo').default;
let options = {name: 'electron sudo application'};
var sudoer = new Sudoer(options);

sudoer.spawn('ls', ['/']).then(function (cp) {
  cp.stdout.on('data', (msg) => {
    console.log('Looks like we have a message on STDOUT');
    console.log(err.toString('utf8'));
  });

  cp.stderr.on('data',(err) => {
    console.log('Looks like we have a message on STDERR');
    console.log(err.toString('utf8'));
  });

  cp.on('close',() => {
    console.log('Processed Finished!');
  });
});
$ electron launcher.js
Looks like we have a message on STDERR
sudo: a password is required

Processed Finished!

@igor-lemon
Copy link

@automation-stack Hi Aleksandr. Do you have any ideas how to fix that?

@automation-stack
Copy link
Owner Author

automation-stack commented Mar 4, 2017

@igor-lemon yes, it will be fixed soon, sudo will become not required for electron-sudo

@igor-lemon
Copy link

Cool. Thank you. I'm looking forward changes. :)

@justechn
Copy link

@automation-stack So is this completely broken on MacOS Sierra or can it still be used? Do you have an ETA on the fix?

@automation-stack
Copy link
Owner Author

@justechn working hard on this issues, details will follow

@treyreynolds
Copy link

Any chance this is fixed? I have been using sudo-prompt but it is actually quite poor in that it doesn't give you access to the underlying child process after it is created.

@rameerez
Copy link

rameerez commented Jul 3, 2017

Same issue here. macOS Sierra 10.12.5.

@DSBalaban
Copy link

Would also love to see this working again. If there's anything we can do to help, let us know!
I'd jump in to fix it, but I have little idea where to start.

@automation-stack
Copy link
Owner Author

@DSBalaban the idea is to refuse to use sudo in this package, I'm working on this

@eriklarko
Copy link

I ran into the same issue and made it work on Sierra at least by using osascript.

The change is hacky but might help someone running into this problem, mullvad@f71134f

@robsontenorio
Copy link

@eriklarko i think you should post a PR to @automation-stack :)

@imdreamrunner
Copy link

Personally I feel the osascript idea is a bit too hack-ish. Really looking forward to @automation-stack 's fix.

@pronebird
Copy link

@imdreamrunner yeah but how's that any different from using sudo and what difference does it make if electron-sudo is broken for over 6 months..

@wemteqdev
Copy link

Is electron-sudo still maintaining? any updates for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests