Quote:
Originally Posted by b0uncer
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.
|
I wasn't planning on doing in real clear text. But using a C application something like this:
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);