Linux

Allow user or group to run sudo on specific applications in Linux

In some situation, we may want to delegate a sudo capability to Linux users or groups without completely giving them full access to the operating system. We can achieve this by using User_Alias inside the /etc/sudoers configuration file. I will share the simple settings that I used in my RHEL server. The configuration before handles […]

Continue Reading…

How to setup static IP address on Red Hat Enterprise Linux 8

Setting up a static IP address on your RHEL or CentOS is simple. Prerequisite This how-to guide requires that you have administrative access to the Linux operating system. Steps 1. Inside the RHEL Operating system, open the terminal and head to /etc/sysconfig/network-scripts cd /etc/sysconfig/network-scripts Using ls command, you can see the available network devices. 2. […]

Continue Reading…

How to change MySQL’s root to use mysql_native_password in Ubuntu

After installing MySQL, log in to it via terminal with $sudo mysql -u root Once inside MySQL, we will need to change the default plugin authentication to mysql_native_password and set a password for root. mysql> ALTER USER [email protected] IDENTIFIED WITH mysql_native_password BY ‘password’; mysql> exit You can now login in MySQL as root using the […]

Continue Reading…

How to change Full Disk Encryption (LUKS) password on Ubuntu 18.04

Did you enabled the full disk encryption (LUKS) on Ubuntu 18.04? I would like to share how you can change the LUKS password. LUKS stands for Linux Unified Key Setup developed in 2004 by Clemens Fruhwirth. Similarly, Apple’s macOS have FileVault and BitLocker for Microsoft Windows operating system. In the terminal you can check the […]

Continue Reading…

Bring Your Old Laptops Back In Service With Light-Weight Linux Distribution

Revive your old laptop back in service using Lubuntu a light-weight version of Ubuntu. I bought this Lenovo IdeaPad S10-3 in 2012 when I was working in Muscat, Oman. This netbook has a blazing Intel Atom processor 1.66GHz, a 2GB DDR3 RAM, and 10″ LCD screen. I was initially thinking of giving it away because […]

Continue Reading…

How to set default group on new files or directory in Linux

I am managing a Linux server where I want developers to run a Springboot application which will generate files and folders. Those newly application created files and folders must inherit the parent group ID to let other developers manipulate the generated information. chmod g+s is for setting and inheriting the setgid. setfacl -m g::rwx is […]

Continue Reading…

How to connect to a Cisco VPN in Ubuntu 18.04 LTS

Here’s the simple steps for you to connect to a Cisco VPN in Ubuntu 18.04 LTS. Cisco, an American company is the leading provider and manufacturer of enterprise network devices, telecommunication hardware, networking security and networking software. According to computer profile as of April 2018, Cisco holds a 73.9% market which makes it the undisputed […]

Continue Reading…

Bash string manipulation in program arguments

In this code snippet, I would like to run an application with a URL payload based on date and time. This code will be executed in a specific schedule everyday and I would like to dynamically inject the date and time in the program argument when the program executes. ./json2csv rules.json “ncp” “http://localhost:8080/api/zget?eid=get-ncp-mv-by-starttime-endtime&starttime=$(date –date=’yesterday’ +\%Y-\%m-\%d)+00:00:00&endtime=$(date […]

Continue Reading…

A simple firewall-cmd cheatsheet

Get Default Zone Get Active Zones List Zone Services Add a permanent port into a zone Remove a permanent port from a zone Firewall-cmd reload I tested this using CentOS 7 with firewalld service running. Get Default Zone To know the default zone, use this command firewall-cmd –get-default-zone Get Active Zones firewall-cmd –get-active-zones List Zone […]

Continue Reading…