The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
what is SUID/GUID bits in UNIX/Solaris reply2soumya UNIX for Dummies Questions & Answers 3 03-03-2008 11:01 AM
setuid Prem UNIX for Dummies Questions & Answers 1 02-16-2007 03:19 PM
cc, setuid, and LD_LIBRARY_PATH WolfBoy UNIX for Advanced & Expert Users 0 01-19-2006 10:56 AM
setuid sticky bit bandaru UNIX for Advanced & Expert Users 0 09-23-2004 04:36 PM
setuid sanjay92 UNIX for Advanced & Expert Users 2 04-15-2002 03:36 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: Oct 2007
Posts: 269
Stumble this Post!
setuid and guid

Hi All,

Can someone give me some info about setuid or guid topic? Also about sticky bit.

Thanks in advance,
itik
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-11-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
Setting the sticky bit on a file instructs the kernel to not swap it out when running, it's seldom used these days.

Setting the sticky bit on a directory, however, instructs the filesystem to only allow a file to be deleted by it's owner, regardless off the write permissions the directory has set. This enables one to allow world write on a directory without allowing one user to interact with another user's files beyond the individual file's permissions. It's great for any directory where multiple users need to create files but you don't want one to delete another's.

A file that is setuid will, if executed, run with the permissions and id of the owner of the file (not necessarily the user logged in). This allows multiple users to share data or to escalate (or downgrade) rights.
It should be used with caution however as any bugs in the script or binary could be exploited to perform unintended tasks as the file owner. Anything forked off by the running executable will also inherit it's parent's rights so be careful of complex apps like vi, emacs etc that can start independant shells.

Setuid on a directory would normally cause any files created within that directory to be owned by the directory owner but this is disabled by default in solaris.

Setgid on a file does nothing on solaris as far as I know.

Setgid on a directory causes any files created to have their primary group set the the same group as the parent directory. It generally (depending on config and solaris revision) also sets the setgid bit on any subdirectories created.
Reply With Quote
  #3 (permalink)  
Old 05-12-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,425
Stumble this Post!
Please see Unix File Permissions
Reply With Quote
  #4 (permalink)  
Old 05-12-2008
Registered User
 

Join Date: Oct 2007
Posts: 269
Stumble this Post!
Ok so what is now used instead of sticky bit?

Thanks and more power,
itik
Reply With Quote
  #5 (permalink)  
Old 05-12-2008
Registered User
 

Join Date: May 2008
Location: Philadelphia
Posts: 6
Stumble this Post!
Hi
I also have same type of issue . I am trying to set owners uid in AIX using chmod 4754 but it does not work . It seems that AIX just ignores set uid thing .
The owner and a user in the group which executes the scripts need to be different . I do not want other user or even users in the group to read certain files (password files etc) .They are used to connect to oracle.
Other reason is that the scripts write to lots of directories on which these other users do not have privileges.
What is the alternate solution. There are 100s of scripts which can not be altered .
Regards
Clifford.
Reply With Quote
  #6 (permalink)  
Old 05-12-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
I'd suggest moving the AIX setuid question over to the AIX section - I'm really only familiar with the Solaris use of it.

itik: I don't think I really understand your question... The sticky bit is still used plenty, it's just rare to use it on a file to hold it in memory - modern schedulers do a better job.

RBAC and sudo are also used as alternatives to setuid.
Reply With Quote
  #7 (permalink)  
Old 05-12-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,425
Stumble this Post!
Part 3 of The Whole Story on #! /usr/bin/ksh discusses suid shell scripts at some length. But a quick management summary: suid and sgid bits are ignored on shell scripts by many kernels. Solaris is an exception to this rule.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0