How To Add and Delete Users on a CentOS 7 Server

How To Add and Delete Users on a CentOS 7 Server

How To Add and Delete Users on a CentOS 7 Server

If you are new to managing a CentOS 7 server, you may need to add or delete users at some point. In this tutorial, we will guide you through the process of adding and deleting users on a CentOS 7 server.

Adding a User

To add a new user on your CentOS 7 server, follow these steps:

  1. Log in to your server as root or a user with sudo privileges.
  2. Open the terminal and type the following command: adduser newusername (Replace "newusername" with the username you want to create).
  3. Press Enter and set a password for the new user when prompted.
  4. Follow the on-screen instructions to provide additional information about the user, such as their full name and phone number.
  5. Once you have provided all the required information, press Enter to create the user.
  6. You can now log in to your server using the new username and password.

Deleting a User

To delete a user from your CentOS 7 server, follow these steps:

  1. Log in to your server as root or a user with sudo privileges.
  2. Open the terminal and type the following command: userdel -r username (Replace "username" with the name of the user you want to delete).
  3. Press Enter and confirm that you want to delete the user by typing "yes" when prompted.
  4. The user and their home directory will be deleted from your server.

Congratulations! You now know how to add and delete users on a CentOS 7 server.

Keywords: CentOS 7, server, add user, delete user, tutorial.

Комментарии

Популярные сообщения из этого блога

How To Modify CSS Classes in JavaScript

How To Backup MySQL Databases on an Ubuntu VPS

How To Backup PostgreSQL Databases on an Ubuntu VPS