setuid bit - error

hi i have written small script which will login 2 two different users with su but if we run from normal user it prompts for password so
i chnaged the owner of script to root and added setuid bit
with
chmod u+s <script_name>

but when i run the script i get following message

Warning: Ignoring setuid/setgid bit on "./testing.sh" as the system tunable "secure_sid_scripts" is set.

It is one of the tunable kernel parameters in HP-UX.

For further information:

man 5 secure_sid_scripts

secure_sid_scripts(5)

Would suggest not setting the suid bit for any shell scripts. If you really need to, use a C wrapper around the script.

...and then statically link the application. :slight_smile: