Intro to System Administration

Becoming super user

In order to run admin tools or commands, you need to be a super user, or root. If you don't feel like logging in as root, you can always become one by running the su command. Being executed without any arguments, this command prompts you for the root password and and gives you the root prompt. If you see the root prompt (usually the pound sign), you are the super user. There are several options of the su command:

In case you need to run only one command and do not want to switch to super user mode, you can use the sudo command, that executes only one command by elevating your privileges. Please note that you should have these privileges in order to be able to run the command you want. That is, this command doesn't switch you to the super user mode for this single command, but allows a user to use his/her privileges that normally are not available. In order to grant a user these extra privileges, we need to modify settings in the /etc/sudoers file. This is a simple text file with good amount of comments, but it cannot be edited directly. Instead, you should use special command visudo. This command will open the file in vi editor and lets you edit and save it. If you would like to use another text editor, you need to define the environment variable DISPLAY and assign the name of the text editor of your choice as a value :

# export DISPLAY=gedit
# visudo
Let's scroll down to the end of the file and uncomment the line (remove the leading pound sign)
%users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
and add a new line
%users ALL=/sbin/reboot
These line mean that members of the users group are now allowed to run mount and umoumt command as well as the reboot command.

The next step would be to add the users to whom you would like to grant these privileges to the group users. In order to do this, open the file /etc/group in a text editor of your choice, locate the line

users:x:100:
and add the login names of the users you would like to be the members of the users group:
users:x:100:daniel,mary

To test the changes, exit from the super user mode and run the following commands:

$ /sbin/reboot
$ sudo /sbin/reboot
note the difference. When prompted for the password by the second command enter the normal user password who executes the command, not the root's password.

Graphical admin programs

Fedora and Red Hat Enterprise Linux offer a list of graphical tools to perform individual administrative tasks. These tools are available through the main menu or could be executed from the shell.

Admin commands

Administrative commands mostly located in two directories: /sbin and /usr/sbin. The first directory is intended to contain tools that only root can use, while the second one contains mostly programs that can be executed by normal users too, but normal users cannot use the full functionality. For example, the mount command can be run by anyone to see the list of mounted volumes, but only the super user (by default) can mount new volumes.

Configuring modules

Fedora system comes with tools for configuring the drivers that stand between the programs you run and the hardware they use. The intention is to have only the most critical drivers your system needs built into the kernel; these are called resident drivers. Other drivers that are added dynamically as needed are referred to as loadable modules. The trend is to keep basic kernel as lean as possible, so that each running system has only a few drivers and it can dynamically add what it needs.

Managing file system and disk space

Homework assignment