EDIT: Re-reading the thread, I see that this is not what you're looking for.
If you're admin on that box, then you can avoid password prompt by using NOPASSWD in the sudoers file. Like this:
Which will allow the user ftpauth to run mkdir as user ftpdata without asking for password.# User privilege specification root ALL=(ALL) ALL ftpauth ALL=(ftpdata) NOPASSWD: /bin/mkdir
In reply to Re: Automating sudo actions
by kirillm
in thread Automating sudo actions
by rastoboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |