old-www/LDP/GNU-Linux-Tools-Summary/html/security.html

301 lines
5.4 KiB
HTML
Raw Permalink Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Security</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="GNU/Linux Command-Line Tools Summary"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Remote Administration Related"
HREF="remote-administration.html"><LINK
REL="NEXT"
TITLE="Some basic Security Tools"
HREF="some-basic-security-tools.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GNU/Linux Command-Line Tools Summary</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="remote-administration.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="some-basic-security-tools.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="SECURITY"
></A
>Chapter 14. Security</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>14.1. <A
HREF="some-basic-security-tools.html"
>Some basic Security Tools</A
></DT
><DT
>14.2. <A
HREF="file-permissions.html"
>File Permissions</A
></DT
></DL
></DIV
><P
>The security chapter is designed to give the user a very basic level of understanding of security within the GNU/Linux operating system. This chapter also has information on the <SPAN
CLASS="PRODUCTNAME"
>UNIX</SPAN
> system style file permissions used on most GNU/Linux machines. </P
><P
>More comprehensive guides can be found at the <A
HREF="http://www.tldp.org"
TARGET="_top"
>Linux Documentation Project</A
>, such as the <A
HREF="http://www.tldp.org/HOWTO/Security-HOWTO/"
TARGET="_top"
>Linux Security howto</A
> authored by Kevin Fenzi and Dave Wreski. </P
><P
>There are also sites such as <A
HREF="http://www.linuxsecurity.com"
TARGET="_top"
>Linux Security</A
>. If your looking for a program to assist in locking down your operating system you may want to check <A
HREF="http://www.bastille-linux.org"
TARGET="_top"
>Bastille Linux</A
> that runs on <SPAN
CLASS="ACRONYM"
>RPM</SPAN
> based distributions (Redhat/Mandriva/SuSE).</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Changing<EFBFBD>root's<>password</DT
><DD
><P
>This trick works well if you have forgotten your superuser password, type<EM
> linux single</EM
> at a LILO/Grub prompt. Then <EM
>passwd</EM
> once the system has started and you are at a console. </P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Grub:</DT
><DD
><P
>If you are using grub go to the relevant line (the one with the kernel and various options) then press 'e' for edit and add &#8220;single&#8221; on to the end of the lines that boot the kernel. Then hit [Enter] and press 'b' (to boot). </P
></DD
><DT
>Lilo:</DT
><DD
><P
>If you are using lilo press escape and type &#8220; linux single&#8221; and then hit [Enter] to boot.</P
></DD
></DL
></DIV
><DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
WIDTH="90%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Security Warning</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>
This is also a basic security hazard if you have others using your computer and security is a concern, you may like to add a password to your LILO or Grub prompt to stop this from being done.</P
></TD
></TR
></TABLE
></DIV
></DD
></DL
></DIV
><P
></P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>umask</DT
><DD
><P
>The umask is a value set by the shell. It controls the default permissions of any file created during that shell session. This information is inherited from the shell's parent and is normally set in some configuration file by the root user (in my case /etc/profile).</P
><P
>umask has an unusual way of doing things ...to set the umask you must describe file permissions by saying what will be disabled. </P
><P
>You can do this by doing 777 minus the file permissions you want. Note that <EM
>umask</EM
> works with numbers only, for an explanation please see, <A
HREF="file-permissions.html"
>Section 14.2</A
></P
><P
>For example:</P
><P
>You want the default during a particular shell session to be equivalent to<EM
> chmod 750</EM
> (user has r/w/x, group has r/x and other has no permissions), then the command you would use would be:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>umask 027</PRE
></FONT
></TD
></TR
></TABLE
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="remote-administration.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="some-basic-security-tools.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Remote Administration Related</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Some basic Security Tools</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>