Is the SUID bit broken or am I losing it?
Asked by
Chris Wagner
Create a little script/file with the following content:
-------
#! /bin/sh
echo `whoami`
-------
Supposing you named that file suid.sh, make it executable:
chris@bethany-
Now run it:
chris@bethany-
chris
Okay, that's expected. Now let's change the owner and add the "suid bit":
chris@bethany-
chris@bethany-
And run it again:
chris@bethany-
chris
Bah! That's not what I expected. I expected the script to run as user bethany.
Any advice/insight would be appreciated! :)
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Will Nowak
- Solved:
- Last query:
- Last reply:
To post a message you must log in.