sudo
I have a question about sudo. Currently, when I use sudo on a system, I don't have to supply a password for restarting apache. Is it possible to set a password and pipe it to sudo?
|
I guess it is, but to me it sounds like a security risk "piping" a password, especially if you thought to do it clear-text-wise.
EDIT: of course it's not good having no password at all, either. |
Quote:
char pass[20]={98,105,106,111}; sprintf(cmd, "echo %c%c%c%c | sudo -S /etc/init.d/apache2 restart", pass[2], pass[3], pass[0], pass[1]); system(cmd); |
All times are GMT -5. The time now is 05:11 PM. |