Configuring a regular user account for CLI monitoring in Linux

OpManager monitors Linux devices through CLI. It also allows you to monitor your Linux devices from a regular user account instead of a root user account. Follow the below steps to configure a regular user account for CLI Monitoring.

Creating a user account

To start with, you have to create a new user account by carrying out the following steps.

  • Open the terminal in the target machine.
  • Login as root user.
  • Run the following command in the terminal for creating a new user.
  • useradd<space><username>

  • Run the following command in the terminal to set a password for the newly created user.
  • passwd<space><username>

Configuring a regular user account for CLI monitoring in Linux

A new user account is now successfully created.

Checking if the user account already has permissions

Before providing the user account with permissions, kindly check if they have already been provided with the permissions by carrying out the following steps.

  • Log in using the newly created user account.
  • In the terminal, run the following commands: df, ps, free and vmstat.
  • If the user can run the above commands in the terminal, it means that the user has permission for carrying out CLI monitoring.
  • If the user cannot run the above commands in the terminal, and the terminal shows the "permission denied" message, then the user has to be provided with the corresponding permissions as explained below.

Note: Generally all users have access to the above-mentioned commands. But in some cases, the access may be restricted for regular users.

Configuring a regular user account for CLI monitoring in Linux

Providing the user account with permissions

In case the user has not been provided with permission to carry out CLI monitoring, kindly follow the below steps to provide them with the same.

  • Open the terminal and log in as root user.
  • Run the following command in the terminal to provide users with the permission to run the command df.
  • setfacl -m u::rwx /bin/df

  • Run the following command in the terminal to provide users with the permission to run the command ps.
  • setfacl -m u::rwx /bin/ps

  • Run the following command in the terminal to provide users with the permission to run the command free.
  • setfacl -m u::rwx /bin/free

  • Run the following command in the terminal to provide users with the permission to run the command vmstat.
  • setfacl -m u::rwx /bin/vmstat

  • Log in to the respective user, run the commands and check them for the desired outputs.

Configuring a regular user account for CLI monitoring in Linux

After creating a new regular user and verifying the permissions of the user, we can associate the newly created username and its password as credentials for the target Linux device in OpManager. It should be able to collect data for CLI monitors.

Now you can carry out CLI monitoring on your devices with your regular user account instead of a root user account.

 
 Pricing  Get Quote