Chapter 7. Configuring and Administering Linux

This chapter equips you to perform common system administration tasks. By using a few simple commands and a text editor, you can override many configuration choices made during system installation. You’ll learn how to add, delete, and modify user accounts, and how to add and delete groups and change their membership. You’ll learn how to configure swap space and how to cause Linux to automatically mount filesystems. This chapter doesn’t deal with the configuration and administration of network facilities, such as servers. Those topics are covered in Chapter 10, Chapter 11, and Chapter 12.

User and Group Administration

In this section, you’ll learn how to perform common administrative tasks affecting users and groups. Most system administration tasks require that you login as root. Throughout this section and subsequent section, you should assume that you must be logged in as root, unless directed otherwise.

Creating a User Account

To create a user account, you use the adduser command, which has the form:

adduser userid

where userid specifies the name of the user account that you want to create. The command prompts you for the information needed to create the account.

Here’s a typical example of using the command, which creates a user account named newbie:

debian:~# adduser newbie Adding user newbie... Adding new group newbie (1001). Adding new user newbie (1001) with group newbie. Creating home directory /home/newbie. Copying files ...

Get Learning Debian GNU/Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.