User Management

From ArchWiki

Jump to: navigation, search


Contents

Summary

A simple guide to setting up users on Arch Linux.

Introduction

Definition

A "user" is anyone who uses a computer. In this case, we are describing the names which represent those users. It may be Mary or Bill, and they may use the names Dragonlady or Pirate in place of their real name. All that matters is that the computer has a name for each account it creates, and it is this name by which a person gains access to use the computer.

Misc.

Managing users is done for the purpose of security by limiting access in certain specific ways.

Also, any individual may have more than one account, as long as they use a different name for each account they create. Further, there are some reserved names which may not be used, including "root", "hal" or "adm".

Finally, users may be grouped together into a "group", and users may choose to join an existing group to utilize the privileged access it grants.

Note: The beginner should use these tools carefully and stay away from having anything to do with any other existing user account, other than their own.

Configuring a User

To set up a new user, type the command:

useradd -d /home/<username> -g users -G <insert other groups here> -m <username>

This command will set up a user. Groups are discussed below.

For more advanced uses of useradd, type:

man useradd

To set up the users password, type:

passwd <username>

adduser

A wizard tool for adding users is

adduser

It asks you about the user, so it can construct a useradd command to run. It also sets the password and changes finger information.

Groups

This is a list of the important groups that you might have a user join.

Information on default important groups in Arch Linux.
Group Description
audio Enables use of speakers.
floppy Allows access to any floppy drives.
network Enables the user to change network settings.
optical Enables the user to access the CD drive.
storage Enables the user to mount storage devices through hal and dbus.
video Allows direct access to video components. (Note: X can be used without being in this group)
wheel Allow access to the root account through tools like sudo (if you enabled it via visudo).

For a list of all the groups on your system, type cat /etc/group

See the groups wiki for a more comprehensive list of Arch's user groups.

To add a user to a group, type:

gpasswd -a <username> <group>
Personal tools