Article

Fire Up your own Linux Server

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Next

Chapter 4. System Administration

So far, we've looked at installing Linux, and we've become reasonably comfortable with both the graphical and the command line interfaces. Now, it's time to delve a little deeper into administrating our Linux Web server.

Creating New Users and Groups

The concepts of users and groups are important in Linux and, as an administrator, you'll surely find the need to add new users as you become more comfortable with the system, or begin to share some of your server's administrative duties. As with other tasks, you can add new users with either a graphical or text-based interface.

The User Manager Tool

In Fedora Core, user and group management tasks are handled by the User Manager tool, which you can start by selecting Desktop > System Settings > Users and Groups, as depicted in Figure 4.1.

Figure 4.1. Opening the User Manager.
1505_4.1

Getting Authorized

System Administration tools will often require root access. When they do, GNOME will prompt you for the root password via the dialog shown in Figure 4.2.

Figure 4.2. GNOME displaying a prompt for the root password.
1505_4.2

Provided you enter the password correctly, you'll become authorized to perform system configuration actions as root without having to re-enter the root password. That authorization is signified by the badge icon in the top right panel, like that shown in Figure 4.3. Once you're done making configuration changes, you can end this authorization by clicking on the badge icon, then clicking the Forget Authorization button on the dialog that appears. The badge icon should then disappear.

Figure 4.3. Displaying the authorization badge.
1505_4.1

Managing Users

The User Manager, shown in Figure 4.4, displays all the user accounts that currently exist on your system. It also displays for each user the User ID number, the group to which that user belongs, the user's full name (optional), the user's default shell, and the home directory. To add a user, click Add User. The dialog shown in Figure 4.5 will appear.

Figure 4.4. The user listing.
1505_4.4

As you can see in Figure 4.5, a Fedora administrator has plenty of options to consider when adding a new user. These include defining the home directory, creating a private group for the user, manually assigning a user ID, and selecting the user's shell. While the defaults are perfectly acceptable in most cases, the process is very flexible and caters well for unusual cases.

Figure 4.5. The Create New User dialog.
1505_4.5

Managing Groups

Users within a Linux system may be consolidated into groups, which can ease the management of file permissions for groups of users. You might, for example, create a "developers" group, into which you'll add all the Web developers who create code for your server. You'd give that group appropriate permissions to the files of your Web application, providing each developer the ability to edit those files without allowing ordinary users access to them.

To add a new group, select Add Group from the User Manager window. The dialog shown in Figure 4.6 will appear.

Figure 4.6. The Create New Group dialog.
1505_4.6

First, you'll need to name the group. In our example, you might, for instance, name the group "Developers." You can also accept the pre-assigned group ID, or GID (500, in this case), or check the Specify group ID manually checkbox to manually assign the group a group ID. (NB. You'll almost always want to accept the pre-assigned ID, because it doesn't matter what a group's ID is, except in very rare cases. If you come across one of those rare cases, you'll know why you want a specific ID; otherwise, accept the suggestion.)

To view the current groups, and add a user to an existing group, select the Groups tab in the User Manager window, as illustrated in Figure 4.7.

Figure 4.7. The User Manager's Groups tab.
1505_4.7

There are two methods by which we can add a user to a group. The first is to select a group in the User Manager and click the Properties button. In the dialog that appears, select the Group Users tab to see a list of users you can add to this group, as shown in Figure 4.8.

Figure 4.8. Adding users to a group.
1505_4.8

Ensure that you've checked all of the users you'd like to include as members of this group, and click OK.

The other way we can add a user to a group is via the User Manager's Users view. In the User Manager, click on the Users tab, select the user you'd like to add to a group, and click Properties. Clicking the Groups tab displays a list of all of the groups of which this user can become part, as shown in Figure 4.9.

Figure 4.9. Adding a user to groups.
1505_4.9

Deleting a user or group within the User Manager window is as easy as creating one. Simply highlight the user or group, then click the Delete button in the User Manager window's toolbar.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links