Administration
  Home arrow Administration arrow Page 4 - Kernel, Cron, and User Administration,...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
Moblin 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Kernel, Cron, and User Administration, Part 1
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2004-08-25

    Table of Contents:
  • Kernel, Cron, and User Administration, Part 1
  • Certification Objective: Shell Configuration Files
  • Setting Up and Managing Disk Quotas
  • The Quota Package
  • Quota Management Commands
  • Automating Quota Settings
  • The Basics of the Kernel
  • Kernel Concepts
  • Other RHEL 3 Kernels
  • Understanding Kernel Modules
  • /lib/modules/kernel_version/ Directory Structure

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th -1:00PM EST. Register Today!

    Kernel, Cron, and User Administration, Part 1 - The Quota Package


    (Page 4 of 11 )

    The quota RPM package is installed by default on RHEL 3, as well as Red Hat Linux 9. You can find out more about RPMs such as quota with the following command:

    # rpm -qi quota

    Assuming you haven’t removed the quota RPM, you’ll see the following description of the package which tells you that it includes a number of tools:

    The quota package contains system administration tools for monitoring and limiting user and or group disk usage per filesystem.

    You can find out more about these tools by reviewing a list of associated files. You can find a list of files installed through the quota RPM with the following command:

    # rpm -ql quota

    As you can see for yourself, the quota package includes the following commands:

    • /sbin/quotaon /fs  Enables quotas for the /fs filesystem.
    • /sbin/quotaoff /fs  Disables quota tracking.
    • /usr/sbin/edquota name  Edits the quota settings for user name. Can also be used to set defaults, or to copy quota settings from one user to another.
    • /usr/bin/quota  Allows users to see their current resource consumption and limits.
    • /usr/sbin/repquota  Generates a report of disk consumption by all users for a quota-enabled filesystem.'
    • /sbin/quotacheck  Scans a filesystem for quota usage. Initializes the quota databases.

    I’ve included the entire path to each command for your reference. But as discussed earlier in this book, I recommend that you normally work as the root user during the Red Hat exams. As the noted directories are all part of the root user’s PATH, you don’t need to specify the full path to each command. (You can verify the directories in your path with the echo $PATH command.)

    The next step is to ensure that the quotas are active and checked when Linux boots on your system.

    sysinit Quota Handling

    The /etc/rc.sysinit script as described in Chapter 4 initializes Linux system services during the boot process. This script includes commands which start quota services. Specifically, this script runs both the quotacheck (to ensure that disk consumption usage records are accurate) and quotaon commands (to enable quotas on all filesystems indicated in /etc/fstab). You don’t have to run these commands manually.

    Quota Activation in /etc/fstab

    As described in Chapter 4, the file /etc/fstab tells Linux which filesystems to mount during the boot process. The options column of this file configures how Linux mounts a directory. You can include quota settings in /etc/fstab for users and or groups.

    ON THE JOB!  Before you edit a key configuration file such as /etc/fstab, it’s a good idea to back it up and save it to any boot or rescue disks that you may have. If your changes lead to a catastrophic failure, you can boot your system from a rescue disk and then restore the original configuration file.

    Here is a sample /etc/fstab before editing:

    Device      Mount point Filesys Options          dump Fsck
    LABEL=/     /           ext3    defaults          1    1
    LABEL=/boot /boot       ext3    defaults          1    2
    none        /dev/pts    devpts  gid=5,mode=620    0    0
    none        /proc       proc    defaults          0    0
    none        /dev/shm    proc    tmpfs             0    0
    /dev/hda3   swap        swap    defaults          0    0
    /dev/hdd1   /home       ext3    defaults          1    2
    /dev/cdrom  /mnt/cdrom  udf,iso9660  noauto,owner,kudzu,ro  0 0
    /dev/floppy /mnt/floppy auto    noauto,owner,kudzu 0    0

    In this configuration, we may want to enable quotas on the root (/) and /home directory filesystems. You can tell Linux to start tracking user quotas by adding the keyword usrquota under the options column. Similarly, you can tell Linux to start tracking group quotas with the grpquota option. Use vi or your favorite text editor to update /etc/fstab.

    In our example, we will add both user and group quotas to the /home directory filesystem:

    Device      Mount point Filesys Options          dump Fsck LABEL=/     /           ext3    defaults          1    1
    LABEL=/boot /boot       ext3    defaults          1    2
    none        /dev/pts    devpts  gid=5,mode=620    0    0
    none        /proc       proc    defaults          0    0
    none        /dev/shm    proc    tmpfs             0    0
    /dev/hda3   swap        swap    defaults          0    0
    /dev/hdd1   /home       ext3 exec,dev,suid,rw,usrquota,grpquota  1    2
    /dev/cdrom  /mnt/cdrom  udf,iso9660  noauto,owner,kudzu,ro  0    0
    /dev/floppy /mnt/floppy auto    noauto,owner,kudzu 0    0

    If you edit the /etc/fstab file by hand, you’ll need to ensure that the line you are editing does not wrap to the next line. If it does, the format for your /etc/fstab will be invalid and you may not be able to successfully boot Linux.

    ON THE JOB!  You can test changes to /etc/fstab by rebooting your computer or remounting a filesystem. For example, if you’ve just added usrquota and grpquota entries as shown to the /home directory filesystem, you can test it with the mount -o remount /home command.

    This is part one from the fifth chapter of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7). Check it out at your favorite bookstore today. Buy this book now.

    More Administration Articles
    More By McGraw-Hill/Osborne


     

       

    ADMINISTRATION ARTICLES

    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway