to give an example: sudo mdutil -a -i on
What password?
sudo wants the password for the account you are currently using.
That account MUST either be a Mac OS X 'admin' account, which you can check via System Preferences -> User & Groups. It should say 'Admin' under your account name. If it says 'Standard' or 'Sharing only', then these accounts would not work.
The alternative, would be to use a privileged account to add a new entry to the sudoers file, but if you do that, then effectively you will turn a 'Standard' user into an 'admin' user.
If you are NOT using an Admin account, and you have given 'root' a password, then you could do:
su root -c 'mdutil -a -i on'
password: root's_password