Reputation: 1937
I need a Shell script, this shell script should : 1. create another shell script 2. set the suid bit for new script as a root user 3. run this new script as current user
Can we do this? anyone can give any idea or some code snippets?
Upvotes: 0
Views: 635
Reputation: 693
This will not work under many versions of unix (or linux). The setuid bit on shell scripts is typically ignored, since it is far too easy to subvert such a program.
Upvotes: 1