LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 02-21-2011, 12:48 AM   #1
Voyager7
LQ Newbie
 
Registered: Jan 2011
Posts: 12

Rep: Reputation: 0
Thumbs up Sticky situation bcos of sticky bit


Hi,
Situation is that there are two users on a Linux server- say A and B
A has been operating a shell script that in turn makes use of and exe file.
The script and exe both are owned by user A.

My problem is that I want user B to make use of the script and exe in exactly the same way user A does.

So I have set suid bit of the script, exe and all the library files that the exe uses.
But the exe is still not executing from user B.

I did a man of chmod on Linux server and it gave an indication that SUID is disabled on new Linux servers.

Now the question is, is there any other command that can perform the same task as SUID did on Unix.
Any other suggestions are welcome.

Thnx
 
Old 02-21-2011, 02:19 AM   #2
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by Voyager7 View Post
Hi,
Situation is that there are two users on a Linux server- say A and B
A has been operating a shell script that in turn makes use of and exe file.
The script and exe both are owned by user A.

My problem is that I want user B to make use of the script and exe in exactly the same way user A does.

So I have set suid bit of the script, exe and all the library files that the exe uses.
But the exe is still not executing from user B.

I did a man of chmod on Linux server and it gave an indication that SUID is disabled on new Linux servers.

Now the question is, is there any other command that can perform the same task as SUID did on Unix.
Any other suggestions are welcome.

Thnx
Hi Voyager7;

First, please spell out your words in a forum (because, not bcos).

Secondly, exe files only run under windows, not linux. Do you meen an executable file? If so, say it that way. If this is a LINUX executable & script, you should create a group that both belong to and make the proper permissions for the script in the group position.

Tom

Last edited by tommyttt; 02-21-2011 at 02:20 AM.
 
Old 02-21-2011, 07:01 AM   #3
Voyager7
LQ Newbie
 
Registered: Jan 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Hi Tom/All,
The Linux exe and script already belong to the same user and group (User A, Group is such that both User A and B belong to the same group).
I have set their SUID bits so that user B will be able to execute them and the process that gets generated will be that of user A.
Still this is not working successfully.
My doubt is whether SUID bit is functional in Linux or not? (As per the man of chmod that I updated in my earlier post)
And if not, is there any other way to perform the same function?

Thnx
 
Old 02-21-2011, 08:42 AM   #4
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 141

Rep: Reputation: 39
Is the filesystem with the executable mounted with suid flag? If it is not, suid bit will be ignored. What does the "mount" command return?

Anyway, setuid should not be used unless necessary, and mounting filesystems with nosuid improves security. tommyttt's solution is cleaner: Create a group (let's call it "mygroup"), make the script and the executable belong to root:mygroup with permissions 750 (rwxr-x---) and make users A and B belong to group "mygroup".

Last edited by cepheus11; 02-21-2011 at 08:44 AM. Reason: typo
 
Old 02-28-2011, 11:29 PM   #5
Voyager7
LQ Newbie
 
Registered: Jan 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Hi,
After a lot of attempts I am finally able to start the process(previously started using user A) using user B.
Now, as suggested, I changed the mountpoint and set its SUID bit for the enabling SUID functionality.
On trying to start the process, it throws the error : "error while loading shared libraries"

Since this error turns up only after I try setting the SUID bit, its a given that the issue's got something to do with SUID bit itself.

Since it throws error related to shared libraries, now please suggest if the folder for shared libraries (like /lib)also need to have their SUID bit set?

If that is indeed the case, I will be changing the approach to the problem since I can't set the SUID bit for the /lib.

Thnx for the help.
 
  


Reply


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
sticky bit lipun4u Linux - Newbie 8 02-28-2010 04:17 PM
stuck on the sticky bit tsunami_imcool Linux - Newbie 2 09-20-2006 12:13 PM
About Sticky bit... masudur_iiu General 4 09-13-2006 10:23 AM
Sticky Bit tarballed Linux - General 4 07-03-2002 03:54 PM
sticky bit motiram Linux - General 1 08-01-2001 12:34 PM


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

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