I have written a bash script for use on my ubuntu box. Now I would like to prevent running this script under my own user and only able to run it as root (sudo).
Is there a possibility to force this. Can I somehow let my script ask for root permissions if I run it under my own username?