User restriction on C/C++ compiler on AIX


 
Thread Tools Search this Thread
Operating Systems AIX User restriction on C/C++ compiler on AIX
# 1  
Old 12-19-2014
User restriction on C/C++ compiler on AIX

Hello,
I am curious that is there a way I can restrict a user or a set of users to execute the C/C++ compiler, basically what I want is to lock it down to a particular user and none of the other users should be able to compile any code.

Thanks in advance.
# 2  
Old 12-19-2014
Maybe if you explained a bit more why/what you are up to can we see if there are some ways of doing...
# 3  
Old 12-19-2014
Thanks for replying vbe.

We don't want all the application team to compile codes and implement it even by mistake. So we want to lock it down to a single user, so if they have to compile a code, they have to either sudo or su to that user and do their work, such that we can keep a track of who's doing what.
# 4  
Old 12-19-2014
Can you do this with the file permissions of the compilation command? If it's /usr/bin/cc then a chmod 500 /usr/bin/cc would tie it down to owner access only. You could expand that a little to have chmod 550 /usr/bin/cc so that the owner & group listed on ls -l /usr/bin/cc would be able to run it.

You could change the group and have in only the account(s) that you want to be able to use it.



I hope that this helps,
Robin
This User Gave Thanks to rbatte1 For This Post:
# 5  
Old 12-19-2014
Compiling code doesnt give you the right to implement it you know...
When you compile the generated executable is by default in the current directory or HOME etc.. to compile so it is implemented means you are root...
In other words compiling and implementing are 2 different things you must allow application team to compile, but in any case that team has the right to implement, what they have compiled just pass tests first in dev etc... then they should issue and RFC for the quality team to examin and decide...
This User Gave Thanks to vbe For This Post:
# 6  
Old 12-19-2014
I agree with VBE. Restrict the data, not the tool. If you restrict permissions on the compiler too much, you may find yourself in an interesting catch-22 someday.
This User Gave Thanks to Corona688 For This Post:
# 7  
Old 12-19-2014
First, you can use auditing to tell what your users are up to.

Second, any developer worth hiring is going to get around that limitation in about 5 seconds. Better take Perl away, too.

Third, as vbe said, if your developers can implement something on your production systems directly, you're sorely in need of configuration management.

---------- Post updated at 01:35 PM ---------- Previous update was at 01:23 PM ----------

Quote:
Originally Posted by Corona688
I agree with VBE. Restrict the data, not the tool. If you restrict permissions on the compiler too much, you may find yourself in an interesting catch-22 someday.
Either that, or be prepared to take away all assemblers, debuggers, linkers, and even hex editors. Along with just about every interpreted language such as Perl and PHP.

And if that doesn't break your system, there are almost certainly other ways to run arbitrary code.

Because what a user can do is limited only by the system calls that user can invoke, and the permissions that user has on the objects of those system calls.

A user's ability to read/write files, open TCP connections, or make any other system call is completely independent of the tool used to create any binary used to make those system calls.
This User Gave Thanks to achenle For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX 5.3 FTP Folder Restriction

Hi All, How can I restrict the folder on an FTP USER on AIX 5.3? I don't want the ID to change folder other than his own home folder. Thanks for any comment you may add. (7 Replies)
Discussion started by: itik
7 Replies

2. Linux

SFTP user access restriction to his home dir

Hi Friends, I have installed a FTP Server on my Linux machine (Fedora 11). I want the ftp users to be restricted to their own home dir using sftp. But the said condition is met when the user logs in using ftp over port 21 and when the user logs in using sftp i.e. protocol 22, he/she has... (4 Replies)
Discussion started by: pashy
4 Replies

3. UNIX for Dummies Questions & Answers

Create a new user with restriction

Hello, I would to create a new user with some restriction: 1. The user will not be able to CD any directory (I mean he'll login to the defined home directory and that's all). 2. The user will not be able to delete anything in that home directory Thanks a lot in advance, Shahar (1 Reply)
Discussion started by: shaharoz
1 Replies

4. UNIX for Advanced & Expert Users

User restriction

Dear All I had one user called msc. In that i had two folder.xxx and yyy ex: /home/msc/xxx ex: /home/msc/yyy Now i want that msc user only able to access xxx folder only. No other folder should be visible to it. Kindly let me know. How it possile?? Regards Jaydeep (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

5. AIX

AIX Xlc compiler

Hi Team I have a native applicaiton built on AIX using the xLC v8 Which could be the possible impacts from a code change point of view if I'll compile with the xLC v10? Thanks Marco (0 Replies)
Discussion started by: antcos
0 Replies

6. AIX

user session restriction

hi, I am facing a problem from the remote system if i login to my AIX5.3 machine as root (thru telnet) the session does not expire for 2 hours even if the session is kept ideal But whenever i do the same thing from some other user then the session is lost within 10 minutes (if session is kept... (2 Replies)
Discussion started by: pchangba
2 Replies

7. AIX

C++ compiler for AIX

please I want a help to how can I get C++ compiler to AIX OS. (3 Replies)
Discussion started by: Ahmed waheed
3 Replies

8. AIX

user session restriction

I want to restrict user's loging according to number of session. example the user named "patrik" can be login concurrently from 12 stations thru telnet the 13th if some body tries to telnet 13th session it should not allow, until any of the 12 sessions are closed. is it possibel ...i think... (2 Replies)
Discussion started by: pchangba1
2 Replies

9. Filesystems, Disks and Memory

Restriction to User

Dear all, I am trying to create a new user account that can have the minimum access to the HP-Ux box, as in it only need to perform system info query like bdf and only able to read access system log files but not able to delete any file from any other directory beside it's own user directory... (5 Replies)
Discussion started by: gelbvonn
5 Replies

10. Shell Programming and Scripting

Restriction for more than one user

How do l restrict more than one users on a multiple programming environment using the c shell profile. That is if a user is log-on on one terminal the system should be able to prompt a message if the users attempt to log on on another terminal. I user openserver 5.0.4 with dummy terminals, and also... (7 Replies)
Discussion started by: kayode
7 Replies
Login or Register to Ask a Question