43.4 F
Nashville
Thursday, November 21, 2024

How to Install the Apache Web Server on CentOS 9

Apache is available within CentOS's default software repositories, which means you can install it with yum.

How to Create Users in Linux

Linux is a multi-user system, meaning that more than one person can interact with the same system simultaneously.

How to Create Bash Aliases

This tutorial demonstrates how to use the alias command to create personalized shortcuts, which can help you save time and feel less frustrated.

How to Create Users in Linux

Create new Linux users with the useradd command

useradd username

The command adds an entry to /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow

Next, you need to set the user password. Type the following command

passwd username

If you add your users to the wheel group, they’ll have the power of a root user.

usermod -aG wheel username

You can verify that the user was created. Run the following command to show the user and group names and numeric IDs.

id username

The users’ and groups’ sudo privileges are configured in the /etc/sudoers file.

To display help, we type the following command

useradd –help

To set an expiry date for a specific user, you can use the usermod command followed by the -e flag, then the expiry date in yyyy-mm-dd format.

usermod -e 2024-10-08 username

Type the following command to verify if the expiration date is set correctly.

chage -l username

Delete user account. The -r option removes the home directory and mail spool of given user account.

userdel -r username

Verify that the user is successfully deleted

id username

Similar Articles

- A word from our sponsors -

Follow Us

Most Popular