Firstly, a nitpick, "Enter root password" is wrong; on ubuntu derived distros there's no root password, to get sudo one enters your user's password.
That's not nice... the password will be visible in the process list, and I suspect that pass phrases will give trouble.
A "nicer" approach is to put the kdialog command in a script on its own:
Put that somewhere in your $PATH, say ~/bin/sudopass.sh, and make it executable with chmod +x. Then,
If you don't want to have your own script, you can use /usr/bin/ssh-askpass, but that doesn't let you control the prompt, and gives a warning.
Originally posted by TheYikes
View Post
A "nicer" approach is to put the kdialog command in a script on its own:
Code:
#!/bin/bash kdialog --password "whatever you like"
Code:
export SUDO_ASKPASS=~/bin/sudopass.sh sudo -A dd ....
Comment