LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-12-2004, 08:44 AM   #1
Fark
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Rep: Reputation: 0
Question Mandrake, security and users not able to do stuff


Hi there,

I have a box running Mandrake, acting as a server (running web, ftp firewall and stuff like that). I'm running it on security level 4, as suggested. No problem, the box works fine.

Now the problem I have is that there are other users using the box, and they can't run stuff like gcc, and make etc. Not even ping or w! Only root can do that, and I don't really want every user to be root, for obvious reasons.

How can I fix this? Do I have any options other than lowering the security level, which I don't want to do.

If anyone can lead me through this it will be greatly appreciated.

Thanks.
 
Old 02-12-2004, 02:34 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Now the problem I have is that there are other users using the box, and they can't run stuff like gcc, and make etc.
That's not a problem, that's rather good user policy :-]

First of all a server is not a development box. On a production server compilers and such should be uninstalled. If you still want to proceed, make a separate group for users that are explicitly allowed to use compilers and add them to those. Remember being able to compile stuff means ppl are able to compile system specific sploits.
 
Old 02-13-2004, 04:32 AM   #3
Fark
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your reply.

Quote:
Originally posted by unSpawn
First of all a server is not a development box.
True true, but unfortunately this is the only box running Linux I have.

Quote:
Originally posted by unSpawn
On a production server compilers and such should be uninstalled. If you still want to proceed, make a separate group for users that are explicitly allowed to use compilers and add them to those. Remember being able to compile stuff means ppl are able to compile system specific sploits.
So the solution would basically be to create a group for, well lets call them super users, that would be allowed to use compilers and any other stuff that would be suitable? What would be the best practice for that?

I'm by no means savvy in this department, I might add.
 
Old 02-16-2004, 05:26 AM   #4
Fark
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Ah, the ctools group was just sitting there, right in front of me.

Ok, so now I have added my regular user to the ctools group in order to use gcc etc. But something else is fishy.

Check this out:

$ groups
fark ctools
$ cat helloworld.c
#include <stdio.h>
int main() {
return 0;
}
$ gcc helloworld.c
$ ls -l ./a.out
-rwxrwxr-x 1 fark fark 11059 Feb 16 12:24 ./a.out*
$ ./a.out
-bash: ./a.out: Permission denied
$

What gives? I'm not at all sure this question belongs in this group, so if it's not, point me in the right direction and I'll be off.
 
Old 02-16-2004, 02:39 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
$ ls -l ./a.out
-rwxrwxr-x 1 fark fark 11059 Feb 16 12:24 ./a.out*
$ ./a.out
-bash: ./a.out: Permission denied


Does the mount command for this particular partition show a "noexec" flag?
You running a Grsecurity reinforced kernel?
Any other non-default security measures we should know of?
 
Old 02-16-2004, 05:48 PM   #6
Fark
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Does the mount command for this particular partition show a "noexec" flag?
Nope.

$ pwd
/home/fark/c
$ mount
...
/dev/hda7 on /home type ext3 (rw)
$

You running a Grsecurity reinforced kernel?
Nope.

Any other non-default security measures we should know of?
None that I can think of. It is a standard Mandrake, using security level 4. Nothing out of the ordinary.

This thing really puzzles me.
 
Old 02-17-2004, 01:01 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
OK. Try running it as "strace -v ./a.out" and post the output?
 
Old 02-17-2004, 12:24 PM   #8
Fark
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
OK. Try running it as "strace -v ./a.out" and post the output?

$ strace -v ./a.out
execve("./a.out", ["./a.out"], [/* 46 vars */]) = 0
strace: exec: Permission denied
$

Doesn't really mean anything to me, but maybe you know?

Thanks a lot for your help.

Last edited by Fark; 02-18-2004 at 02:45 PM.
 
Old 02-18-2004, 03:43 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Shame on me, but I ate a roast, downed a bottle of my favourite White Zinfandel, and am gettin slightly sloshed on 'ol Jameson. Is there any way you can ascertain this is due to Mandy's security level and not in-kernel restrictions? I mean, could you do something like boot to single user level (severs network connections etc), set a lower security level and try again?
 
  


Reply



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
users and stuff, freakin'me Linux - Newbie 2 10-06-2005 03:54 PM
security presntetion for end users juanb Linux - Security 1 07-22-2004 06:28 PM
Basic security stuff mymojo Linux - Security 9 11-26-2003 11:49 AM
Closing ports & other security stuff WorldBuilder Linux - Security 3 06-01-2003 04:35 PM
SuSE 7.3 sound and security stuff loper Linux - Software 0 03-21-2002 11:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration