• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Linux administration question

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have some basic question on simple Linux administration related tasks. How can I make sure that the new user that got created does not have permissions to view certain files like /etc/shadow and more over which are the files that I need to protect? Do we have a predefined mechanism or a shell script that by default secures the system for all other users other than root for certain sensitive files.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Linux comes from Unix and Unix grew up in college computer labs, which means that it very quickly learned to protect itself from student pranks, hackers, and less admirable things.

Every file and directory in the Linux filesystem has a filesystem mask that indicates the permission to read, write, or execute (in the case of directories, to access). These 3 bits are themselves grouped into 3 categories: owner, group, and other.

/etc/shadow has by default the following mask: 400, which means that only the owner (root) can read it, and no else can do anything with it. So it's set up properly right out of the box.

/etc/shadow was, in fact created because people were reading /etc/passwd to get stuff like the list of valid userids, and they didn't want the really critical info to be in that file. So if a password is "x", the actual password is in /etc/shadow.

Ironically, this simple system is a lot less powerful than the ACL system that Windows NT and later versions support, but since security isn't something that can be slapped on top of an insecure system, Windows is infamous for security problems and Unix and Linux are not.

However, the 3-bits system is pretty crude, so more recently the selinux system was developed to allow more precise control of access. That, however, is a topic worthy of an entire book.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic