Comments on: What is Sticky Bit, SUID and SGID in Linux https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/ How to guide for System Administrator's and Developers Tue, 26 Apr 2022 04:30:11 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: ankit https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-58900 Mon, 08 Feb 2021 11:13:58 +0000 https://tecadmin.net/?p=516#comment-58900 Why ‘SUID’ need if other user has execute permission already

]]>
By: sanjeev https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-41664 Wed, 10 Jul 2019 15:29:11 +0000 https://tecadmin.net/?p=516#comment-41664 I have a question : if a user can change his password with passwd command on which suid is set, means he get the root permission to make changes in /etc/passwdord and /etc/shadow file then how that user can not change the password of other users which permission prevents users to do that..

]]>
By: Ganesh Bagde https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-43 Thu, 16 Apr 2015 06:32:55 +0000 https://tecadmin.net/?p=516#comment-43 Hi,

Thanks for shared article with us.. It is really good, I cleared my confussion when I was read your document.

]]>
By: iceman94 https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-42 Mon, 27 Jan 2014 04:27:37 +0000 https://tecadmin.net/?p=516#comment-42 Hi.
In some patterm, SUID not work for shell script
http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html

]]>
By: Rathin https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-41 Sat, 26 Oct 2013 03:23:51 +0000 https://tecadmin.net/?p=516#comment-41 I would like to add a more point on SB, SUID and SGIDd which is important to keep it in mind and for reference.

small “s” – symbolically says the file has no execute persmission
capital “S’ – has sticky bit , suid or sgid enables with execute permission

for example:
rwSrwxrwx — has no execute permission for the owner/normal user who runs a script if applicable

where as

rwsrwxrwx — is sound meaningful.

]]>
By: Sahil https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-40 Mon, 09 Sep 2013 03:14:19 +0000 https://tecadmin.net/?p=516#comment-40 Hi Rahul Sir,

[root@linux ~]# ls -l /usr/bin/mytest
-rwsr-xr-x 1 root root 52 Sep 9 08:41 /usr/bin/mytest
[root@linux ~]# ls -l /etc/myfile
-rw-r–r– 1 root root 24 Sep 9 08:41 /etc/myfile

]]>
By: Rahul https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-39 Mon, 09 Sep 2013 02:52:31 +0000 https://tecadmin.net/?p=516#comment-39 Hi Sahil,

First thing you need to SUID to your script created under /usr/bin/. Can you send me the result of ls -l of both files ?

]]>
By: Sahil https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-38 Sun, 08 Sep 2013 13:39:06 +0000 https://tecadmin.net/?p=516#comment-38 Sir,

Thank you for nice post,
But I have question, I try to create a script under /usr/bin/ directory after that i created a file uder /etc dir and give the . And give the permision chmod u+s /etc/filename, now i try to run as a normal user , it is running but not able to edit this file /etc/filename ???
where as you said after passwd command , there will some changes in /etc/shaddow and /etc/passwd file ..

Please help me

]]>
By: QuickBooks Hosting https://tecadmin.net/understanding-sticky-bit-suid-and-sgid-in-linux/#comment-37 Mon, 02 Sep 2013 03:46:51 +0000 https://tecadmin.net/?p=516#comment-37 Great explanation it really saved my time, keep doing the nice work.

Thank you very much.
David

]]>