Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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?
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 09:44 AM.
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.