You don't always have to enter your password when you run something with sudo, that's just the default. By editing the sudoers file, you can configure rules that allow specific users and/or commands to run as root without a password.
Be very careful when doing this. If done incorrectly, it could potentially be a security risk. Also, NEVER just open the sudoers file in a text editor and make changes. If you accidentially break something, you'll be unable to get root again, so you won't be able to fix it. Instead, use the command
- Code: Select all
which is specifically designed for it.
I don't remember the details about how to do this, but this should give you an idea of what's possible, and how to search for it.