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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.