×

Create a Sudo User on CentOS - How to do it ?

This article covers how to create a user with sudo privileges. You can now log in to your CentOS server with this user account and use sudo to run administrative commands.

Performing server administration as a non-root user is a best practice.

For security, your first task when deploying a CentOS instance is to create a non-root user with sudo access.


How to Add a New User Account on CentOS Linux System ?

1. To Create a new user account with the adduser command:

# adduser example_user

2. Set a strong password for the new user (new_user) with passwd.

# passwd new_user


Create a Sudo User on Debian - Step by Step Process ?

This article covers how to create a user with sudo privileges. You can now log in to your Debian server with this user account and use sudo to run administrative commands. Basically, In linux sudo is masterpiece to allow users to execute commands with another user's privileges, default is root user.


How to Create a new user account in Debian ?

Create a new user account using the adduser command. Don't forget to replace username with your desired user name:

$ adduser username


To Add the user to the sudo group

Use the usermod command:

$ usermod -aG sudo username


Install LAMP Stack on Ubuntu 18.04 - Step by Step Process ?

This article covers step by step process to install a LAMP stack on an Ubuntu 18.04 server. LAMP stack is a group of open-source software that is typically installed together to host dynamic websites. LAMP stands for Linux OS, with Apache web server, Data store in a MySQL database, and dynamic content is processed by PHP.


To Install Apache and Update the Firewall.

1. Install Apache using Ubuntu’s package manager, apt:

$ sudo apt update
$ sudo apt install apache2

2. Allow incoming HTTP and HTTPS traffic for this profile:

$ sudo ufw allow in "Apache Full"


Create a Sudo User on Ubuntu 20.04 - Step by Step Process ?

This article covers how to create a user with sudo privileges. You can now log in to your Ubuntu server with this user account and use sudo to run administrative commands.

Basically, The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. 


Install PHP On Ubuntu 18.04 | 16.04 - Step by Step Process ?

This article covers steps To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu Linux System. PHP stands for Hypertext Preprocessor, and it’s a script-based server-side programming language. PHP is often used to automate server tasks. It handles tasks like dynamic content, database requests, and processing and displaying data.

A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. 

This term is actually an acronym which represents the Linux operating system, with the Apache web server. 

The site data is stored in a MySQL database, and dynamic content is processed by PHP.


To Install PHP 7.2 with Apache on Ubuntu:

1. Ensure you are using the latest Ubuntu updates by entering the following command into a terminal window:

$ apt-get update && apt-get upgrade

2. To install PHP 7.2, enter the following command:

$ sudo apt-get install php libapache2-mod-php

Confirm the installation by hitting Enter. The system will download and install PHP from the software repositories. This command also installs dependencies and modules for use with Apache.

3. Verify PHP was installed, with the command:

$ php -v


Install Slack on Ubuntu 20.04 - Step by Step Process ?

This article covers the different methods of installation of Slack on the Ubuntu 20.04 system in detail.
Slack is a well-known and modern communication tool used to organize various communications in channels so that teams can work together and communicate when needed.

Slack Installation on Ubuntu using Snap package:
1. Install snapd package in your system. write the appended command, and then hit enter.

$ sudo apt install snapd

2. If the latest apt is not installed in your system then try using apt-get update && apt-get upgrade to get all of the available updates.
3. You can install the slack by using affixed command. You need to type this command on the terminal then press enter.

$ sudo snap install slack --classic


Change Sudo Password Timeout on Ubuntu 20.04 LTS - How to do it ?

This article covers how you can easily change the sudo password timeout by adding a single entry in the sudoers file. If you are using Vi instead of Nano, follow the instructions described here.
You use sudo for some command in the terminal, it asks for the password.

You enter the password, the command runs.
For the subsequent commands, even if they need superuser privileges, you don't need to enter the password again.
After a certain amount of time, when you try to use sudo, it asks for the password again.
It happens because there is a default timeout in Ubuntu and other Linux system for Sudo. In Ubuntu, this default sudo timeout is 15 minutes.
If you think 15 minute is too short or too long you can even change the sudo password timeout in Ubuntu.

To Change sudo password timeout in Ubuntu:
1. Open a terminal (Ctrl+Alt+T) and use the following command:

$ sudo visudo

It will open a file in nano text editor that contains some settings related to sudo.
In here look for the following line:

Defaults        env_reset

Replace above line with this one:

Defaults        env_reset, timestamp_timeout=XX

Where XX is the new timeout value in minutes.
Of course you have to replace the XX with the desired timeout value.
2. Once you are done changing the default sudo password timeout, use Ctrl+X to exit the editor.
It will give you option to save or cancel the changes.

Use Y to save the changes.


Add a User to Sudoers on Ubuntu 20.04 LTS - Step by Step Process ?

This article covers how to add a user to sudoers using different methods, limit root access with sudo and remove a user from sudoers.

Sudo is a very handy tool for system administrators that allow them to provide root access to a user with granularity.


Steps to Add Sudo User on Ubuntu ?

1. Log into the system with a root user or an account with sudo privileges.

2. Open a terminal window and add a new user with the command:

# adduser newuser

The adduser command creates a new user, plus a group and home directory for that user.

You may get an error message that you have insufficient privileges. (This typically only happens for non-root users.) Get around it by entering:

# sudo adduser newuser

3. You can replace newuser with any username you wish. The system will add the new user; then prompt you to enter a password. Enter a great secure password, then retype it to confirm.


To Add User to Sudo Group:

1. In a terminal, enter the command:

# usermod -aG sudo newuser

Replace newuser with the username that you entered in Step 1.

Again, if you get an error, run the command with sudo as follows:

# sudo usermod -aG sudo newuser

The -aG option tells the system to append the user to the specified group. (The -a option is only used with G).


Install MongoDB on Ubuntu 20.04 LTS - Step by Step Process ?

This article covers how to install MongoDB on Ubuntu 20.04 LTS using either the apt package manager or by downloading and installing through the archive. For more information, visit MongoDB's official documentation.


MongoDB is an open-source and cross-platform document-oriented database system written in C++. It stores data in collections of JSON-like, flexible documents and used to create powerful websites and applications. 

Due to its scalability and high performance, it is used for building modern applications that require powerful, mission-critical and high-availability databases.


To Configure MongoDB on Ubuntu:

MongoDB default configuration file is located at /etc/mongod.conf

By default, each user will have access to all databases and perform any action. 

For production environments, it is recommended to enable the MongoDB authentication.

i. You can do it by editing the file /etc/mongod.conf:

$ nano /etc/mongod.conf

2. Add the following lines:

security:
  authorization: enabled

3. Save and close the file then restart the MongoDB service to apply the changes:

$ systemctl restart mongod


Advantages of MongoDB:

1. Absence of a schema

2. Based on the collections of various documents

3. A clear structure of every object

4. Highly scalable

5. Internal memory is used to store data, which lets us get data faster.

6. Data is stored as JSON objects.

7. MongoDB supports document-based queries


Add User to Group in Ubuntu Linux - Step by Step Process ?

This article covers how to add a user to a group on Ubuntu Linux System. If you want to learn about adding or removing a user on Linux OS, you can follow our guide on How to Add and Remove Users on Linux .

User accounts can be assigned to one or more groups on Linux. You can configure file permissions and other privileges by group. For example, on Ubuntu, only users in the sudo group can use the sudo command to gain elevated permissions.


To Add a New Group on Ubuntu Linux:

If you want to create a new group on your system, use the groupadd command following command, replacing new_group with the name of the group you want to create:

$ sudo groupadd mynewgroup


To Add an Existing User Account to a Group:

To add an existing user account to a group on your system, use the usermod command, replacing examplegroup with the name of the group you want to add the user to andexampleusername  with the name of the user you want to add:

$ usermod -a -G examplegroup exampleusername


Set Up Postman on Ubuntu 20.04 - Step by Step Process ?

This article covers the method of installation of Postman on the Ubuntu 20.04 system. Also, we explored the method to set up Postman and how to send a request for the first time. 

Here, you will also learn the method of removing Postman application from system.


Postman is a complete API development platform that helps you manage your APIs in every stage of development, from designing and testing, to publishing API documentation and monitoring. 

Postman started as a Chrome browser extension and quickly became one of the most widely used API tools by developers all over the world.


Installing Postman on Ubuntu:

The easiest way is to install Postman on Ubuntu is by using the snappy packaging system. 

Snaps are self-contained software packages that include the binary all dependencies needed to run the application. Snap packages can be installed from either the command-line or via the Ubuntu Software application.

To install the Postman snap, open your terminal (Ctrl+Alt+T) and run the following command as a user with sudo privileges :

$ sudo snap install postman


Install IntelliJ IDEA on Ubuntu 20.04 LTS - Step by Step Process ?

This article covers the different methods to install IntelliJ IDEA on Ubuntu 20.04 Linux system. Basically, In developing Java applications, IntelliJ IDEA is arguably one of the most ergonomic and formidable IDEs there is. 

It ships with all the right tools and a set of plugins to make coding a seamless exercise.


To Install IntelliJ IDEA from command line on Ubuntu:

1. Start by opening a terminal window and execution of the bellow apt command. Select your preferred version to install:

$ sudo snap install intellij-idea-community --classic

OR

$ sudo snap install intellij-idea-ultimate --classic

OR

$ sudo snap install intellij-idea-educational --classic

2. You can start the IntelliJ IDEA using the below command:

$ intellij-idea-community

OR

$ intellij-idea-ultimate

OR

$ intellij-idea-educational


Add and Remove Users on Ubuntu 20.04 - How to perform this task ?

This article covers how you can add and remove users on Ubuntu and assign them administrator privileges. Based on your convenience, you can either choose to add and remove users either through the command line or GUI. 

Ubuntu, like any other Linux distribution, is a multi-user operating system. Each user can have different permission levels and specific settings for various command-line and GUI applications.

Knowing how to add and remove users is one of the basic skills a Linux user should know.


To add a user in Ubuntu via GUI:

1. Open the Activities overview and start typing Users.

2. Click on Users to open the panel.

3. Press Unlock in the top right corner and type in your password when prompted.

4. Press the + button, below the list of accounts on the left, to add a new user account.


To remove a user from Ubuntu:

1. Open the terminal app.

2. Login to server using the ssh user@server-ip-here command.

3. Run sudo deluser --remove-home userNameHere command to delete a user account on Ubuntu.

4. Verify it by running id command.


To Remove a Linux user:

1. Log in to your server via SSH.

2. Switch to the root user: sudo su -

3. Use the userdel command to remove the old user: userdel user's username.

Optional: You can also delete that user's home directory and mail spool by using the -r flag with the command: userdel -r user's username.


To Add a User to Linux:

1. Log in as root.

2. Use the command useradd "name of the user" (for example, useradd linuxapt)

3. Use su plus the name of the user you just added to log on.

4. "Exit" will log you out.


Linux operations commands:

1. adduser : add a user to the system.

2. userdel : delete a user account and related files.

3. addgroup : add a group to the system.

4. delgroup : remove a group from the system.

5. usermod : modify a user account.

6. chage : change user password expiry information.


How do I assign a user to a group in Linux?

1. To create a new group, enter the following: sudo groupadd new_group.

2. Use the adduser command to add a user to a group: sudo adduser user_name new_group.

3. To delete a group, use the command: sudo groupdel new_group.

4. Linux comes with several different groups by default.


Install Emacs Editor in Ubuntu 20.04 - How to perform it ?

This article covers methods to install Emacs editor in the Ubuntu 20.04 system. Emacs is a text editor designed for POSIX operating systems and available on Linux, BSD, macOS, Windows, and so on.


Emacs is an open-source, cross-platform editor that is highly customizable and provides a user-friendly interface to its users. 

It Provide features like multiple editing modes, full Unicode support for scripts, text manipulation tools, and integration with numerous external tools like the shell and git clearly gives an indication of how powerful it is.


To Install Emacs on Linux:

You can check if your Linux system has emacs installed by simply running the following command:

$ emacs

If you get an error message such as "-bash: -bash:: command not found", then you need to install it.

To install the emacs packages, run the command:

$ yum install emacs

On Ubuntu, execute:

$ apt-get install emacs


To install Emacs using Snap on Ubuntu:

Execute the following command in the command line:

$ sudo snap install emacs --classic

Once this is done, you can find Emacs in your list of installed applications.


Different methods to Reboot Ubuntu 20.04 LTS ?

This article will guide you on the different methods through which you can effectively reboot your #Ubuntu 20.04 system without any difficulty. 

To #reboot immediately, append the -r flag: $ sudo shutdown -r now. 

To power down immediately: $ sudo shutdown -P now. 

You can use the poweroff #command: $ poweroff. 

To reboot after 10 minutes: $ sudo shutdown -r 10.


To reboot Linux using the command line:

1. To reboot the Linux system from a terminal session, sign in or "su"/"sudo" to the "root" account.

2. Then type " sudo reboot " to reboot the box.

3. Wait for some time and the Linux server will reboot itself.


Install Linux, Apache, MariaDB, PHP (LAMP) Stack on Debian 10 - Step by step process to do it ?

This guide will help you on how to #install the LAMP stack (Linux, Apache, MariaDB, and PHP ) in your #Debian system. 

LAMP stands for Linux, Apache, MySQL, and PHP. Together, they provide a proven set of software for delivering high-performance web applications.

For a web application to work smoothly, it has to include an operating system, a web server, a database, and a programming language. 

A LAMP Stack is a set of open-source software that can be used to create websites and web applications. 

LAMP is an acronym, and these stacks typically consist of the Linux operating system, the Apache HTTP Server, the MySQL relational database management system, and the PHP programming language.

To Install #LAMP stack on Ubuntu:

1. Update your system. sudo apt-get update.

2. Install Mysql. sudo apt-get install mysql-server mysql-client libmysqlclient-dev.

3. Install #Apache server.

4. Install #PHP (php7.0 latest version of PHP).

5. Install #Phpmyadmin (for #database).


Install MongoDB ( NoSQL ) on Linux (Ubuntu 20.04) - Step by step process ?

This article will guide you on how to add MongoDB’s official #repository and install the latest stable release of MongoDB #NoSQL in the #Ubuntu 20.04 LTS system. 

Also, you will learn how to completely uninstall from the system in case you no longer need it.

MongoDB stores data in db folder within data folder. But, since this data folder is not created automatically, you have to create it manually. 

Remember that data directory should be created in the root (/).

To get stats about #MongoDB server, type the command db. stats() in MongoDB client. 

This will show the database name, number of collection and documents in the database.

In MongoDB, data is stored as documents. 

These documents are stored in MongoDB in JSON (JavaScript Object Notation) format. 

#JSON documents support embedded fields, so related data and lists of data can be stored with the document instead of an external table.


Methods to Log Out of Linux Mint 20 ?

This article will guide you on methods to logout from the Linux #Mint. Based on your convenience, you can use either the keyboard shortcut or the system menu to logout from your session. When you use a terminal or if you log in to an #Ubuntu system via #SSH, you open a shell session. If you want to logout from your session, you simply exit the #shell. This is why the exit command is equivalent to log out command in Linux.

To switch users in #Linux:

The su command lets you switch the current user to any other user. 

If you need to run a command as a different (non-root) user, use the –l [username] option to specify the user account. 

Additionally, su can also be used to change to a different shell interpreter on a go.


Step by step process to host an application in XAMPP webserver on Linux Mint 20 ?

This article will guide you on how to work with #XAMPP in Linux Mint 20. This will help you to easily host your #applications on this server. With this, you can create a simple PHP application, however, you can even choose to create applications with complex functionality that are not essentially written in #PHP but can also be written in Perl or #MySQL.

XAMPP is a powerful and versatile solution for setting up a local web server. It presents a perfect way to create an environment for basic #WordPress coding, experimenting with multisite settings, tweaking #themes, and much more.

To run xampp on Linux:

1. Install gnome-panel to be able to create launcher.

2. Run the below command to execute the Create Launcher Application.

3. The "create launcher" window pops up and select “Application” as the Type.

4. Enter for example "XAMPP starter" as the Name.

5. Enter "sudo /opt/lampp/lampp start" into the Command Box.

To Remove Xampp from Linux (Ubuntu):

i. >sudo /opt/lampp/uninstall.

ii. Alternatively > sudo -i cd /opt/lampp ./uninstall.

iii. > sudo rm -r /opt/lampp.


Step by step process to install MongoDB on Linux Mint 20 ?

This article will guide you on methods to install MongoDB on #Linux #Mint 20 system. You can check #MongoDB status, and can also access its shell to pass #commands to this database.

MongoDB installs as a #systemd service, which means that you can manage it using standard systemd commands alongside all other sytem services in Ubuntu. To verify the status of the service, type: sudo systemctl status mongodb.

Companies and development teams of all sizes use MongoDB because: The document data model is a powerful way to store and retrieve data that allows developers to move fast. MongoDB's horizontal, scale-out architecture can support huge volumes of both data and traffic.

To start MongoDB in Debian:

1. Start MongoDB. Issue the following command to start mongod: sudo service mongod start.

2. Stop MongoDB. As needed, you can stop the mongod process by issuing the following command: sudo service mongod stop.

3. Restart MongoDB. Issue the following command to restart mongod: sudo service mongod restart.


Steps to set up FFmpeg on Ubuntu 20.04 LTS ?

This article will guide you on steps to #install #FFmpeg on your Ubuntu 20.04 system and can use it for #video and #audio editing and #conversions from one format to another. FFmpeg is a vast and powerful collection of video and audio processing tools. Once you know the #command syntax, you can use it to manipulate video and audio files in basically any way that you can imagine. See the official documentation at FFmpeg's website https://www.ffmpeg.org/documentation.html to see everything it can do. To install FFmpeg on #Ubuntu: 1. Start by updating the packages list: sudo apt update. 2. Next, install FFmpeg by typing the following command: sudo apt install ffmpeg. 3. To validate that the package is installed properly use the ffmpeg -version command which prints the FFmpeg version: ffmpeg -version.


How to Install sudo on OpenSUSE to execute commands as root ?

This article will guide you on how to use the root user on #OpenSUSE Linux and the sudo command.To use sudo, you need to install and configure sudo on the OpenSUSE #Linux server. The #sudo command allows you to run #programs with the security privileges of another user (by default, as the #superuser). Using the #sudoers file, system administrators can give certain users or groups access to some or all commands without those users having to know the root password.


How to log into your Linux Server as a root user?

This article will guide you on how to run commands as root user using nonuser, su, and sudo utilities.


A complete guide on creating a Sudo User on Ubuntu 20.04 LTS

This article will help you to add a user account with access and privileges to run system administrator’s commands on Ubuntu 20.04 LTS systems.


The complete steps on how to add and create a Sudo User on CentOS Linux 8 sudoers

This article will guide you on how to add a new and existing user account to sudo in CentOS 8 by appending them to wheel group so that they can run admin commands.



More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com






Keep In Touch