EUR
european

EUR

usa

USD

Ex. VAT Ex. VAT 0%

Adding a new user

Overview

After you receive a dedicated server, you log in with the default account: root on Linux or Administrator on Windows. For daily work it is safer to create a separate user for each person who needs access. This way you can control who has administrator rights and remove access for a single person without changing the main password.

This guide shows how to add a user on Linux and on Windows Server, give it administrator rights and check that the login works.

Before you begin

You need:

  • the server IP address and the default password from the client area (Orders, then your server, then Order Details);
  • an SSH client for Linux or a Remote Desktop client for Windows;
  • the name of the new user and a strong password for it.

Adding a user on Linux

Connect to the server over SSH as root:

ssh [email protected]

Debian and Ubuntu

Create the user with the adduser command. It creates the home directory and asks you to set a password:

adduser username

Enter the password twice. The other fields (full name, phone and so on) are optional, press Enter to skip them.

To give the user administrator rights, add it to the sudo group:

usermod -aG sudo username

AlmaLinux, Rocky Linux and CentOS

Create the user and set a password:

useradd -m username passwd username

To give the user administrator rights, add it to the wheel group:

usermod -aG wheel username

Checking the new user

Switch to the new user and run a command with sudo:

su - username sudo whoami

Enter the password of the new user. If the output is root, the user has administrator rights. Type exit to return to the root session.

For better security, log in with an SSH key instead of a password. Copy your public key to the server from your own computer with ssh-copy-id [email protected].

Adding a user on Windows Server

Connect to the server via Remote Desktop as Administrator.

Using Computer Management

  1. Open Server Manager and select Tools, then Computer Management.
  2. Go to System Tools, then Local Users and Groups, then Users.
  3. Right-click an empty area and select New User.
  4. Enter the user name and the password twice.
  5. Clear the User must change password at next logon checkbox if you want to set the final password yourself, or leave it selected so the user sets their own password.
  6. Click Create, then Close.

Giving access and rights

A new user cannot connect over Remote Desktop until you add it to a group:

  1. In Local Users and Groups, open Users and double-click the new user.
  2. Open the Member Of tab and click Add.
  3. Enter the group name and click OK:
    • Remote Desktop Users, to allow Remote Desktop login without administrator rights;
    • Administrators, to give full administrator rights. Members of this group can also connect over Remote Desktop.
  4. Click OK to save the changes.

Using PowerShell

You can do the same in PowerShell run as administrator:

$Password = Read-Host -AsSecureString New-LocalUser -Name "username" -Password $Password Add-LocalGroupMember -Group "Remote Desktop Users" -Member "username"

To give administrator rights, replace Remote Desktop Users with Administrators.

Checking the new user

Disconnect from the server and connect again via Remote Desktop with the new user name and password.

Info

If the server is a domain controller, local users are not available. Create the user in Active Directory Users and Computers instead.

Removing access

When a person no longer needs access, remove their user:

  • on Linux, run userdel -r username (the -r option also deletes the home directory, so save any files you need first);
  • on Windows Server, open Local Users and Groups, then Users, right-click the user and select Delete.

Warning

Do not delete or disable the default root or Administrator account. If you lose access to all accounts, you will need the IP-KVM console to recover the server.

VAT

  • Other

    Ex. VAT

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    22%
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • kingdom
  • germany
  • Español
  • French
  • Hrvatska
  • Italiano
  • Poland
  • Slovenski
  • ukraine
  • Türkçe
  • Русский
  • Other
  • Austria
  • Belgium
  • Bulgaria
  • Croatia
  • Cyprus
  • Czech Republic
  • Denmark
  • Estonia
  • Finland
  • France
  • Germany
  • Greece
  • Hungary
  • Ireland
  • Italy
  • Latvia
  • Lithuania
  • Luxembourg
  • Malta
  • Netherlands
  • Poland
  • Portugal
  • Romania
  • Slovakia
  • Slovenia
  • Spain
  • Sweden
  • USA