Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

system command requiring administrative privileges #214

Closed
dusual opened this Issue Dec 17, 2010 · 2 comments

Comments

Projects
None yet
3 participants

dusual commented Dec 17, 2010

For system command that require administrative privileges there is no mechanism to hide the password.


!sudo apt-get install grin
[sudo] password for amit: abcdef

The problem was encountered on ubuntu 10.04 with ipython version 0.14+

Owner

takluyver commented Mar 22, 2011

Within Python, there's a getpass module for this sort of thing. But we have to send user input on to a running process, and I don't think there's a good general way to discover when the process wouldn't echo stdin. As a simple workaround, we could make a sudo magic function which would use getpass, then run the process and silently feed it that password.

Contributor

bfroehle commented Jul 27, 2012

Two points:

  1. I cannot reproduce this on Ubuntu 12.04.
  2. There are several potential workarounds, including:
  • Hit ctrl-z to drop back to your shell and run sudo there.
  • Run !bash to get a shell prompt, then run sudo.

For these reasons, I'm going to mark the issue as closed.

@bfroehle bfroehle closed this Jul 27, 2012

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