Prime Stake Pool
WebsiteTwitterTelegram
  • Home
  • About Us
  • Server Setup Basics
    • How to setup your Cloud Server securely
      • Create new user
      • Use ssh key pair to access your server
        • Create .ssh folder
        • Create rsa key pair (public/private)
        • Copy rsa public key to remote server
      • Disable root login,password and change default port 22
      • Install fail2ban
      • Firewall rules
      • Enable 2FA
      • Setup video
    • Linux Swap Space
      • Add Swap Space
      • Kernel cache pressure and swappiness
      • Add swap video
  • Server Settings
    • Setting Up chrony
    • Static IP using Netplan
    • Time Synchronization
    • Important Settings
    • TMUX
  • Linux Commands
    • Basic Commands
    • Important Uses
  • Node Setup Guide
    • Cardano
      • How to minimize missed slot leader checks / missed blocks
        • Garbage collection
        • Run node in multicore mode
        • Turn off TraceMempool
    • Ethereum
  • Monitoring
    • Raspberry Pi ARM
    • Linux System x64
  • Maintenance
  • Logical Volume Management (LVM)
    • Basic concepts
    • LVM Resize
      • Decrease an LVM partition
      • Increase an LVM partition
    • Add a new PV to VG
    • LVM Commands
    • LVM on Pi
  • Disk Check
  • Backup Disk
Powered by GitBook
On this page
  1. Server Setup Basics
  2. How to setup your Cloud Server securely

Create new user

Security Layer 1

PreviousHow to setup your Cloud Server securelyNextUse ssh key pair to access your server

Last updated 2 years ago

Now among the seven layers of security first we will see how to create a new user.

First check user login with command 'whoami'.

whoami

root

So we are logged in as user 'root'. Now let's create a new user as our first layer of security.

adduser rocket

Adding user 'rocket' ...

Adding new group 'rocket' (1000) ...

Adding new user 'rocket' (1000) with group 'rocket' ...

Creating home directory '/home/rocket' ...

Copying files from '/etc/skel' ...

Now here since I re-created user 'rocket' after deleting it, so I got the following mesage:

The home directory '/home/rocket' already exists. Not copying from '/etc/skel'.

If you are creating new user for the first time then you won't see the above message.

Now create password for the new user rocket.

New password:

Retype new password:

passwd: password updated successfully

Changing the user information for rocket

Enter the new value, or press ENTER for the default

Full Name[]:

Full Name[]:

Room Number []:

Work Phone []:

Home Phone []:

Other []:

Now if the information provided is correct then accept it with 'y' and press enter.

So now we have created the user 'rocket' with required information. Now let's give root privileges to the user 'rocket' with the following command:

 usermod -aG sudo rocket

Now let's switch to new user 'rocket' with the command:

sudo su - rocket
whoami

rocket

Logged in as user 'rocket', now let's check if root privileges is given to user 'rocket' or not with the following command:

sudo whoami

[sudo] password for rocket:

root