Hi, I hope you can help me solve this question in Centos 7: I want to create an account…
- User
Hi, I hope you can help me solve this question in Centos 7: I want to create an account for a user named 156003 and ID number 156003. What instructions should I use?
Prove your successful creation the account in two different ways: a. the first by using direct command that displays logged user details, b. and the second is by extracting the created user details from the suitable configuration file
- Assistant
To create an account for a user named "156003" with an ID number of 156003 in CentOS 7, you can use the following instructions:
-
Open a terminal on your CentOS 7 system.
-
Switch to the root user by running the following command and entering the root password:
sudo su -- Create a new user account with the desired username and ID number by executing the useradd command:
useradd -u 156003 156003- Set a password for the newly created user. You can use the
passwdcommand to set a password as follows:
passwd 156003You will be prompted to enter the password, and then confirm it.
Now, to prove the successful creation of the account, you can follow the two methods mentioned:
a. Displaying logged user details using a direct command:
whoami -