Exam EX200 All QuestionsBrowse all questions from this exam
Question 8

SIMULATION -

Create a user named alex, and the user id should be 1234, and the password should be alex111.

    Correct Answer:

    To create a user named alex with a user ID of 1234 and set the password to alex111, follow these steps: Firstly, use the 'useradd' command with the '-u' option to specify the user ID. The command will be: 'useradd -u 1234 alex'. Secondly, use the 'passwd' command to set the password for the user alex. The command sequence will be: 'passwd alex', then enter 'alex111' twice when prompted to set and confirm the password.

Discussion
ktd971

useradd -u 1234 -p alex111 -m alex

Rahul95

#useradd -u 1234 alex #passwd alex - it will ask for new password for user alex #cat /etc/passwd | grep alex or id alex - to verify

ogwogwo

With The answers I see, it makes the uid and the gid the same while the question asks only the uid to be changed.

smdrouiss

It doesn't mention the group ID

Mayowa15

#useradd alex -u 1234 #passwd alex #alex111 #alex111

SOAPGUY

one more '-' needed; echo alex111 | passwd --stdin alex