in black and white
Main menu
Share a book About us Home
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

Red Hat Linux Bible - Negus C

Negus C Red Hat Linux Bible - Wiley & sons , 2003. - 761 p.
ISBN 764-543-334
Download (direct link): redhatlinuxbiblefedoraand2003.pdf
Previous << 1 .. 157 158 159 160 161 162 < 163 > 164 165 166 167 168 169 .. 261 >> Next

1. As the root user, edit the /etc/sudoers file by running the visudo command:
2. # visudo
By default, the file is opened in vi, unless your EDITOR variable happens to be set to some other editor acceptable to visudo (for example, export EDiTOR=gedit) The reason for using visudo is that the command will lock the /etc/sudoers file and do some basic sanity-checking of the file to ensure it was edited correctly.
ABC Amber CHM Converter Trial version,
No If
te yo
3. Uncomment the following line to allow users in the group named wheel to have full root privileges on the computer:
%wheel ALL=(ALL) ALL
The previous line causes the user to be prompted for a password to be allowed to use administrative commands. To allow users in the wheel group to have that privilege without using a password, uncomment the following line instead:
4. Save the changes to the /etc/sudoers file (in vi, type zz ).
5. Still as root user, open the /etc/group file in any text editor and add the users you want to have root privilege to the wheel line. For example, if you were to add the users mary and jake to the wheel group, the line would appear as follows:
wheel:x:10:root,mary,jake At this point, the users mary and jake can run the sudo command to run commands, or parts of
commands, that are normally restricted to the root user. The following is an example of a session by
the user jake after he has been assigned sudo privileges:
[jake]$ sudo umount /mnt/win
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these two things:
#1) Respect the privacy of others.
#2) Think before you type.
ABC Amber CHM Converter Trial version,
Password: *********
[jake]$ mount /mnt/win
mount: only root can mount /dev/hda1 on /mnt/win
[jake]$ sudo mount /mnt/win
In the above session, the user jake runs the sudo command so he can unmount the /mnt/win file system (using the umount command). He is given a warning and asked to provide his password (this is jake's password, not the root password).
Notice that even after jake has given the password, he must still use the sudo command to run the command as root (the first mount fails, but the second succeeds). Notice that he was not prompted for a password for the second sudo. That's because after entering his password successfully he can enter as many sudo commands as he wants for the next five minutes without having to enter it again. (You can change the timeout value from five minutes to however long you want by setting the passwd_timeout value in the /etc/sudoers file.)
The preceding example grants a simple all-or-nothing administrative privilege to everyone you put in the wheel group. However, the /etc/sudoers file gives you an incredible amount of flexibility in permitting individual users and groups to use individual applications or groups of applications. I recommend you refer to the sudoers and sudo man pages for information about how to tune your sudo facility.
ABC Amber CHM Converter Trial version,
Administering Your Red Hat Linux System
Your Linux system administrator duties don't end after you have installed Red Hat Linux. Your ongoing job as a Linux system administrator includes the following tasks:
Configuring hardware — Often when you add hardware to your Red Hat Linux computer, that hardware will be automatically detected and configured by tools such as kudzu. In those cases where the hardware was not properly set up, you can use commands such as lsmod, insmod, and rmmod to configure the right modules to get the hardware working.
Managing file systems and disk space — You must keep track of the disk space being consumed, especially if your Red Hat Linux system is shared by multiple users.
At some point, you may need to add a hard disk or track down what is eating up your disk space (you can use commands like find to do this).
Monitoring system performance — You may have a run-away process on your system or you may just be experiencing slow performance. Tools that come with Red Hat Linux can help you determine how much of your CPU and memory are being consumed.
Keeping software up2date — Corrections to Red Hat Linux software, especially those related to security issues, should be incorporated into your system as time goes on. The Red Hat Network offers the up2date service to enusre that you get critical fixes.
The aforementioned administrative tasks are described in the rest of this chapter. Later chapters cover other administrative topics, such as managing user accounts (Chapter 11), automating system tasks ( Chapter 12), system backups and restores (Chapter 13), and securing your system (Chapter 14). Tasks related to network administration are covered in Chapters 15 through 26.
Previous << 1 .. 157 158 159 160 161 162 < 163 > 164 165 166 167 168 169 .. 261 >> Next