I'm trying to have a script run as root that adds directories and changes permissions, but I'm not sure how to have it run as root without prompting the user for a password. The user is not necessarily a sudoer, so doing any kind of sudo -S command or changing sudoer preferences to not require a password won't work here. Any ideas?
Sudo is your friend. Configure /etc/sudoers to allow anyone to run the script at a particular location, eg:
ALL ALL = NOPASSWD: /path/to/my/root/script