Manual configuration of quotas involves changing entries in your system's file system table, /etc/fstab
, to add the usrquota
mount option to the desired portion of your file system. As an example in a simple file system, quota management can be enabled like this:
LABEL=/ / ext3 defaults,usrquota 1 1
Group-level quotas can also be enabled by using the grpquota
option. As the root opera tor, you must then create a file (using the example of creating user quotas) named aquota.user
in the designated portion of the file system, like so:
# touch /quota.user
You should then turn on the use of quotas by using the quotaon
command:
# quotaon -av
You can then edit user quotas with the edquota
command to set hard and soft limits on file system use. The default system editor (vi
unless you change your EDITOR
environment variable) is launched when a user's quota is edited.
Any user can find out what her quotas are with the following:
$ quota -v
No graphical tools supported by Fedora can be used to configure disk quotas. A Quota mini-HOWTO is maintained at http://www.tldp.org/HOWTO/Quota.html.
You will use these commands to manage user accounts in Fedora:
> ac
— A user account-statistics command
> change
— Sets or modifies user password expiration policies
> chfn
— Creates or modifies user finger information in /etc/passwd
> chgrp
— Modifies group memberships
> chmod
— Changes file permissions
> chown
— Changes file ownerships
> chpasswd
— Batch command to modify user passwords
> chsh
— Modifies a user's shell
> groups
— Displays existing group memberships
> logname
— Displays a user's login name
> newusers
— Batches user management command
> passwd
— Creates or modifies user passwords
> su
— Executes shell or command as another user
> sudo
— Manages selected user execution permissions
> system-config-users
— Fedora's graphical user management tool
> useradd
— Creates, modifies, or manages users
> userinfo
— Fedora's graphical chfn
command
> usermod
— Edits a user's login profile
> userpasswd
— Fedora's graphical user password command
Reference
> http://howtos.linux.com/howtos/User-Authentication-HOWTO/index.shtml — The User-Authentication HOWTO describes how user and group information is stored and used for authentication.
> http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Shadow-Password- HOWTO.html — The Shadow-Password HOWTO delves into the murky depths of shadow passwords and even discusses why you might not want to use them.
> http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Security- HOWTO.html — A must-read HOWTO, the Security HOWTO is a good overview of security issues. Especially applicable to this chapter are sections on creating accounts, file permissions, and password security.
> http://www.secinf.net/unix_security/Linux_Administrators_Security_Guide/— A general guide, the Linux System Administrator's Security Guide has interesting sections on limiting and monitoring users.
> http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Path.html — How can one know the true path? The Path HOWTO sheds light on this issue. You need to understand paths if you want to guide the users to their data and applications.
> http://www.courtesan.com/sudo/ — The SU
peruser DO
command is a powerful and elegant way to delegate authority to regular users for specific commands.
> http://www.kernel.org/pub/linux/libs/pam/index.html — The Pluggable Authentication Modules suite contains complex and highly useful applications that provide additional security and logging for passwords. PAM is installed by default in Fedora. It is not necessary to understand the intricacies of PAM to use it effectively.
> http://localhost/localdomain/ — Your Fedora system contains man and info pages on just about everything covered here. Use man -k
to search on a keyword.
CHAPTER 11
Automating Tasks
In this chapter, you will learn about the three ways to automate tasks on your system: making them services that run as your system starts, making them services you start and stop by hand, and scheduling them to run at specific times.
After you turn on the power switch, the boot process begins with the computer executing code stored in a chip called the BIOS; this process occurs no matter what operating system you have installed. The Linux boot process begins when the code known as the boot loader starts loading the Linux kernel and ends only when the login prompt appears.
As a system administrator, you will use the skills you learn in this chapter to control your system's services and manage runlevels on your computer. Understanding the management of the system services and states is essential to understanding how Linux works (especially in a multi-user environment) and will help untangle the mysteries of a few of your Fedora system's configuration files. Furthermore, a good knowledge of the cron
daemon that handles task scheduling is essential for administrators at all skill levels.
In this chapter, you'll take your first steps in shell scripting, but if you want to take it further, Chapter 33, 'Writing and Executing a Shell Script,' is dedicated exclusively to programming shell scripts. These are preset lists of commands that you want to execute all at once, so putting them in a shell script means you can just type the name of the script and all the commands run in sequence. For now, though, we're more interested in having things done automatically for us