LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   meaning of suid on /usr/bin/passwd (https://www.linuxquestions.org/questions/linux-newbie-8/meaning-of-suid-on-usr-bin-passwd-695853/)

raj k yadav 01-08-2009 10:12 AM

meaning of suid on /usr/bin/passwd
 
Hi gurus.I m newbee in linux and trying to learn it. I have a doubt- somewhere i have read about suid, and what i understood is 'when suid is applied on an executable then it works on permissions of owner of file.

Now take example of /bin/passwd its default permissions in my system are rwsrwxr_x. As per the meaning of suid everyone can execute this command and can change their password. As its working on the permissions of file owner which has permissions rws, then there is no use of execute permission of other. If so why this command doesnt work for other users if i change the permissions to rwsrwxr--.

Pls guide me.

Tinkster 01-08-2009 10:52 AM

Hi, welcome to LQ!

And the o=r doesn't work because perms get evaluated left
to right. While sticky will make passwd able to manipulate
/etc/shadow for non-root users they still need to be allowed
to actually *run* it, which they can't if o-x ...


cheers,
Tink


All times are GMT -5. The time now is 03:51 PM.