Changing server time zone — Ubuntu

This is very important when you have some programs scheduled to run using cron. Display current timezone cat /etc/timezone Because I’m using New York timezone, this will display:America/New_York How to change the server timezone? I’d like to change the server to Dubai timezone, so I’ll enter: ln -sf /usr/share/zoneinfo/Asia/Dubai /etc/localtime To list other countries timezone […]

How to install Python 3 and Pip3 in Ubuntu 16

This is the easiest way to install Python 3 on Ubuntu 16 server and making it the default program to run Python 3. Update first your system sudo apt-get update Install prerequisite sudo apt-get install build-essential libpq-dev libssl-dev openssl libffi-dev zlib1g-dev sudo apt-get install python-pip python3-pip python3-dev -y Making Python to execute Python3 A simple […]

How to disable root access — Ubuntu

To add another layer of security on your Ubuntu server, we have to disable root access to avoid your server exposed to a brute force attack. Before doing this, first you should have a sudo user account. Disabling the root access: sudo nano /etc/ssh/sshd_config Change PermitRootLogin from yes to no: PermitRootLogin no Now save the […]

Create a sudo user — Ubuntu

To have an administrator privileges, you have to add the user to sudo group. Log in to your Ubuntu server using your root account or a sudo user if you already have. While on the terminal type this command: adduser your_username or sudo adduser your_username Assign a password. Enter it twice. Now that you have […]

User Group Management — Ubuntu

Show All User cut -d: -f1 /etc/passwd Add User To add username kyle, enter the following: sudo adduser kyle or sudo useradd kyle To add the user home directory automatically, please use -m option, this will creates a home directory sudo useradd -m kyle Giving Sudo permission usermod -aG sudo kyle To remove/delete a user: […]