Table of Contents

Usermanagement

To set up a user on a Linux server, there are a few steps you will need to follow. Here is a general guide for doing so:

1. Open a terminal session on the server. Connect to a Server via SSH

2. Run the command sudo adduser <username> to create a new user. You will be prompted to enter a password and other information such as the full name and email address.

3. Once the user has been created, run the command sudo usermod -aG sudo <username> to give the user sudo privileges. This allows the user to run commands as the root user.

4. Run the command su - <username> to log in as the new user.

5. The new user is now set up and can run commands on the server.

Note: This is a general guide and the exact steps may vary depending on the Linux distribution and server configuration. It is recommended to read the documentation of the distribution and tools being used to ensure that the user setup is performed correctly.

Commands

Here are more details on the commands used above, to give you more options on the different steps and more freedome in the way of you configuration.

adduser

The adduser command has a number of options that you can use to specify additional information or behavior when creating a new user. Here is a list of some of the most commonly used options:

all options need a double dash in front of them

These are just a few examples of the options that are available with the adduser command.

For a complete list of options, you can run the man adduser command to get man page for a full documentation

usermod

The usermod command is used to modify user accounts in Linux. It is typically used to change user account attributes, such as the user's login name, password, or group membership. Here is an overview of some of the most useful options for the usermod command, along with their syntax:

I hope this information is helpful! Let me know if you have any questions or need further clarification on any of the options.