Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-18-2010, 12:36 PM   #1
Registered: Jun 2010
Location: India
Distribution: Redhat
Posts: 68

Rep: Reputation: 1
Question Any One Can Explain SUID ?

i want examples.................

Old 11-18-2010, 12:41 PM   #2
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,706

Rep: Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090Reputation: 5090
Originally Posted by raviteja_s View Post
i want examples.................
Great to know what you want. And we want you to try looking something up for yourself....did you try Google?
Old 11-18-2010, 01:07 PM   #3
Senior Member
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Thumbs down

Hi Ravi,

Please DO NOT use bossy language. We are here to help each other but at the same time we are NOT bound to help. Please be professional.

Always when you post your questions, tell us what you have tried so far, be it google or anything else.

I hope you understand my point.

Anyways, here is what you need.

SUID (or SetUID) is the executable which runs with the ownership of the program owner.
That is, if you own an executable, and another person issues the executable, then it runs with your permission and not his. The default is that a program runs with the ownership of the person executing the binary.

Example: /usr/bin/passwd

[root@server1 ~]# ls -l /usr/bin/passwd
-rwsr-xr-x 1 root root 22960 Jul 17  2006 /usr/bin/passwd
  Shows SUID
This s denotes SUID, now this executable is owned by root but still you can use (when you change your passwords) it with root's ownership.
Try changing the permission of the file as root by
chmod 0755 /usr/bin/passwd
Now, login to another user other than root and try changing the password. You won't be able to do it.

Then, set SUID
chmod 4755 /usr/bin/passwd
and login to another user other than root and try changing the password. Now, you would be able to change the password.

Hope this helps. Get back if you still need help.

Last edited by vikas027; 11-18-2010 at 01:12 PM. Reason: Forgot something


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SUID problem kevmcool Linux - Newbie 3 05-28-2010 11:55 AM
Suid? whishkah Linux - Software 5 09-07-2006 03:17 PM
why all these SUID files? edman Linux - Security 1 02-01-2005 02:59 PM
Suid only for one user? sti2envy Linux - Security 2 11-04-2004 10:43 PM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 08:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration