190 lines
6.4 KiB
HTML
190 lines
6.4 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>Under /etc (A Simple Guide) LG #94</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="kolp.html"><< Prev</A> | <A HREF="index.html">TOC</A> | <A HREF="../index.html">Front Page</A> | <A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue94/lalji.html">Talkback</A> | <A HREF="../faq/index.html">FAQ</A> | <A HREF="yan-fa.html">Next >></A>
|
|
<!-- *** END navbar *** -->
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<TABLE BORDER><TR><TD WIDTH="200">
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
|
|
WIDTH="200" HEIGHT="41" border="0"></A>
|
|
<BR CLEAR="all">
|
|
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
|
|
</TD><TD WIDTH="380">
|
|
|
|
|
|
<CENTER>
|
|
<BIG><BIG><STRONG><FONT COLOR="maroon">Under /etc (A Simple Guide)</FONT></STRONG></BIG></BIG>
|
|
<BR>
|
|
<STRONG>By <A HREF="../authors/lalji.html">AmirAli Lalji</A></STRONG>
|
|
</CENTER>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
<H2>Abstract:</H2>
|
|
|
|
<P>This article is focused towards Linux newbies providing them with a basic
|
|
understanding of /etc sub-directory.</P>
|
|
|
|
|
|
<H2>Introduction</H2>
|
|
|
|
<P>Newcomers to Linux, especially those coming from the Windows background,
|
|
often find files in the /etc directory difficult to understand. In this
|
|
article I will give a brief explanation of some of these files and their use.
|
|
But, before we dive into the /etc directory I would like to point out that
|
|
changes to some of these files can render your system unstable or in some
|
|
circumstances unbootable. I cannot emphasize this enough that you should make a
|
|
backup of the file(s) before making any changes. </P>
|
|
|
|
|
|
<H2>Lets Dive In....</H2>
|
|
|
|
<b>/etc/exports</b>
|
|
|
|
<P>This file contains the partition configuration to load NFS (Network File Systems).
|
|
It tells how partitions are mounted and shared with other Linux/UNIX systems.</P>
|
|
|
|
|
|
<b>/etc/ftpusers</b>
|
|
|
|
<P>This file contains login names of users who are not allowed to login via FTP.
|
|
It is recommended to add user root in this file for security.</P>
|
|
|
|
|
|
<b>/etc/fstab</b>
|
|
|
|
<P>This file automatically mounts filesystems which are spread accross multiple
|
|
drives or seperate partitions. This file is checked when the system boots and
|
|
filesystems mounted.</P>
|
|
|
|
|
|
<b>/etc/hosts.[allow, deny]</b>
|
|
|
|
<P>You can control access to your network by using these files. You can add hosts
|
|
to hosts.allow file to which you want to grant access to your network or add
|
|
hosts to hosts.deny to which you dont.</P>
|
|
|
|
|
|
<b>/etc/inetd.conf or /etc/xinetd.conf</b>
|
|
|
|
<P>The inetd file can be called the father of networking services. This file is
|
|
responsible for starting services like FTP, TELNET etc. Some Linux distributions
|
|
come with xinetd.conf which stands for Extended Internet Services Daemon, which
|
|
provides all the functionnalities and capabilities of inetd but extends them
|
|
further.</P>
|
|
|
|
<P>It is advisable to comment services which you do not use.</P>
|
|
|
|
<b>/etc/inittab</b>
|
|
|
|
<P>This file describes what takes place or which processes are started at bootup or
|
|
at different runlevels. Runlevel is defined as a state in which the Linux box is
|
|
currently in. Linux has 7 runlevels from 0-6.</P>
|
|
|
|
|
|
<b>/etc/motd</b>
|
|
|
|
<P>This file which stands for "message of the day" is executed and its contents
|
|
displayed after a successful login.</P>
|
|
|
|
|
|
<b>/etc/passwd</b>
|
|
|
|
<P>This file contains user information. Whenever a new user is added, an entry is
|
|
added to this file containing the loginname, password etc. This file is readable
|
|
by everyone on the system. If the password field contains "x" than encrypted
|
|
passwords are stored in /etc/shadow file which is only accessible by user root.</P>
|
|
|
|
|
|
<b>/etc/profile</b>
|
|
|
|
<P>When a user logs in a number of configuration files are executed, including
|
|
/etc/profile. This file contains settings and global startup information for
|
|
bash shell.</P>
|
|
|
|
|
|
<b>/etc/services</b>
|
|
|
|
<P>This file works in conjunction with /etc/inetd.conf or /etc/xinetd.conf files
|
|
(see above). This file determines which port a service mentioned in inetd.conf
|
|
is to use, for eg. FTP/21, TELNET/23 etc.</P>
|
|
|
|
|
|
<b>/etc/securetty</b>
|
|
|
|
<P>This file lists ttys from which root is allowed to login. For security reasons
|
|
it is recommended to keep just tty1 for root login.</P>
|
|
|
|
|
|
<b>/etc/shells</b>
|
|
|
|
<P>This file contains names of all shells installed in the system with their full
|
|
path names.</P>
|
|
|
|
|
|
<H2>In the end....</H2>
|
|
|
|
<P>I hope you enjoyed this article and hope it helped in understanding the /etc
|
|
directory. You might find other subdirectories beneath the /etc directory which
|
|
are application specific for eg. /etc/httpd, /etc/sendmail are
|
|
for apache and sendmail respectively.</P>
|
|
|
|
<P>If you have any comments or suggestions, please feel free to email me at
|
|
aalalji@bcs.org.uk</P>
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN author bio *** -->
|
|
<P>
|
|
<P>
|
|
<!-- *** BEGIN bio *** -->
|
|
<P>
|
|
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
|
|
<em>
|
|
AmirAli Lalji is a System Administrator/DBA and lives and works in UK
|
|
and Portugal.
|
|
</em>
|
|
<br CLEAR="all">
|
|
<!-- *** END bio *** -->
|
|
|
|
<!-- *** END author bio *** -->
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<hr>
|
|
<CENTER><SMALL><STRONG>
|
|
Copyright © 2003, AmirAli Lalji.
|
|
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
|
|
Published in Issue 94 of <i>Linux Gazette</i>, September 2003
|
|
</STRONG></SMALL></CENTER>
|
|
<!-- *** END copyright *** -->
|
|
<HR>
|
|
|
|
<!--startcut ==========================================================-->
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="kolp.html"><< Prev</A> | <A HREF="index.html">TOC</A> | <A HREF="../index.html">Front Page</A> | <A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue94/lalji.html">Talkback</A> | <A HREF="../faq/index.html">FAQ</A> | <A HREF="yan-fa.html">Next >></A>
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|