If you don't want to enter password manually you use -A option of sudo
-A, --askpass
Normally, if sudo requires a password, it will read it from the user's
terminal. If the -A (askpass) option is specified, a (possibly graphi‐
cal) helper program is executed to read the user's password and output
the password to the standard output. If the SUDO_ASKPASS environment
variable is set, it specifies the path to the helper program.
How to use it?
make a file which will contain your password (unencrypted):
cat .pass
#!/bin/bash
echo password
Now set it permissions to only executable by only you:
chmod u=x,go= .pass
now the actual usage
SUDO_ASKPASS="~/.pass" sudo -A <command>
This way you can run any command as root without entering password
I wouldn't recommend you to store your password unencrypted on your computer, it is very unsafe.