Solved

Making the nix box more secure! #1

Posted on 2004-10-05
3
216 Views
Last Modified: 2010-04-20
Hello there,
I have a fedora Linux server with ensim control panel,
Sometimes i give free shells to my friends so they can
Do whatever they want, only for good purposes.
I don’t want them to start going everywhere in there
I mean when they type cd /home and they can see the
Other users dir and files or in /usr anywhere, i don’t want
Any of my friends to be able to see any of those dirs or files
Any way to make that happen? when i add a user i do
adduser "namehere" then it will be added in "/home/namehere"
Thanks for any help!
0
Comment
Question by:Xtry
  • 2
3 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12229563
This is normal for a Unix box.  You could set up a chroot jail if you so desired but frankly, anything that the users shouldn't get to is protected from them  (or it should be unless you really screwed things up!).

Take note that although one user can do a "cd /home" and see the user's home directories, they can't by default look in them.  The permissions for a home dir are 700, thus giving no access to any but the user (owner) himself.  Try it yourself -- create a new user and then attempt to cd into that user's home directory.  You shouldn't be able to!

Barry



0
 
LVL 6

Expert Comment

by:blkline
ID: 12229586
One other thing -- you didn't mention if you were using FC1 or FC2... the latter has vestiges of SELinux so you can use access control lists.  That will give you better (finer grained) control than earlier versions.  It's turned off by default so you'll need to do a little research before enabling it if you want to use it.

Barry
0
 
LVL 3

Accepted Solution

by:
nalanbar earned 500 total points
ID: 12247458
chmod the directories. Chmod works one three levels: owner, group, everyone else. If you chmod a directory to 764, for example, you will give the owner full permissions, the group write permissions, and everyone else only read permissions. If you use 700, the owner will have full controll, but noone, other than root will be able to look into the directory. Again, the command is "chmod ###" 1 is equal to execute, 2 is equal to write, 4 is equal to read... add the number of the permissions you want together, and that is the umber you use for that field. For example, owner=full permissions, group= read, others get none= chmod 740 (file or directory name).
You can get more info on it if you use man chmod, or here, http://www.mkssoftware.com/docs/man1/chmod.1.asp though this webpage is a little heady...
You could also look into chattr, although that is a HUGE step above chmod...
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

709 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now