Does the setuid bit not work for shell scripts?
I need a script to execute with the priviledges of the owner. So I use the setuid bit. However, this doesn't seem to work. I set the permissions exactly as they're set on the passwd program, but the script won't run under those permissions... it's running under the "other" set of permissions instead of with the permissions of the owner. Almost like the setuid bit did nothing at all.
Does this has something to do with the fact that scripts are executed under subshells? When I capture a list of the running processes, passwd shows the UID of root, while my script shows my own UID.
I need a script to execute with the priviledges of the owner. So I use the setuid bit. However, this doesn't seem to work. I set the permissions exactly as they're set on the passwd program, but the script won't run under those permissions... it's running under the "other" set of permissions instead of with the permissions of the owner. Almost like the setuid bit did nothing at all.
Does this has something to do with the fact that scripts are executed under subshells? When I capture a list of the running processes, passwd shows the UID of root, while my script shows my own UID.