Short answer: You can't execute arbitrary admin commands without either
Long answer: You must either have NOPASSWD
in /etc/sudoers
, or log as root. See https://askubuntu.com/questions/147241/execute-sudo-without-password.
visudo
then add a line
username ALL=(ALL) NOPASSWD: ALL
As requested, if you want to run, as root, a specific binary file, you might use
chown root:wheel /usr/binary
chmod u+s /usr/binary
however, if program you want to run as root without sudo is a shell (or a python, awk, perl), you can't.
beware of pitfall, on my main ubuntu /usr/bin/shutdown
is a link to /sbin/systemctl
.
I would need to copy the later to the former before applying chmod/chown above.