[PyQt] Asking for temporary privilege elevation

Shriramana Sharma samjnaa at gmail.com
Sat Jan 6 15:33:09 GMT 2018


On 1/6/18, Barry <barry at barrys-emacs.org> wrote:
>
> This is not pyqt problem.

Never said it was. Just wanted to know what approach PyQt users employ
for this problem.

> But short answer is you cannot change current
> process privs.

OK.

> Use subprocess to spawn a sudo command line. You need to set sudo askpass to
> allow the sudo password to be entered.

To avoid external dependency on an askpass program (and there only
seem to be "ssh-askpass" programs, none for generic sudo), I suppose I
can just get the password from an input dialog and then pass it to
`sudo -S`?

-- 
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸


More information about the PyQt mailing list