LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about setuid (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-setuid-690536/)

trist007 12-14-2008 01:36 PM

A question about setuid
 
I'm running Backtrack 3. I just created a new user so that I won't be using root all the time. I adduser <user> then I went to Konqueror start --> switch user --> start new session and logged in my new user. I'm unable to run some commands like sudo, cat, hexdump, so I logged in as root and edited the /etc/sudoers file. I had to make it writeable first. I added

user ALL=/usr/local/bin/sudo
user ALL=/usr/bin/cat
user ALL=/usr/bin/hexdump

However, I noticed that I had to chmod u+s /usr/local/bin/sudo as root while the others /usr/bin/cat and /usr/bin/hexdump did not require that setuid attribute. So pretty much, I just chmod u+s /usr/local/bin/sudo and not the other two commands. I took off the writeable permission from /etc/sudoers and then I logged back in as my user and all three commands work.

Why is it that only sudo requires the setuid permission while the other two commands don't require the setuid permission?

hasanatizaz 12-14-2008 02:48 PM

http://www.linuxquestions.org/questi...setuid-690535/


All times are GMT -5. The time now is 09:17 AM.