This question already has an answer here:
- Allow setuid on shell scripts 8 answers
I created a simple bash script which contains the command
ifconfig. In general I want to execute such a privileged script to run as non-root user. I have tried
hown root:users ./path/to/script.sh followed by
chmod 4550 ./Desktop/dhcp_client.sh I tried even 4755. I want to use bash scripts to include some privileged commands then I must run the script that contains them as non-root. Then I must invoke these scripts from an application which is run as non-root.