200-901 exam dumps

200-901 practice question 163 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 163

Select 3

As a network automation engineer, you are tasked with managing users and directories on a Linux-based server that hosts your Python scripts. You need to create a new user named 'devnet_user', assign them a home directory at '/home/devnet_user', and verify their access to the directory. Which of the following steps would you take to achieve this?

  1. A

    Use the command sudo useradd -m -d /home/devnet_user devnet_user to create the user and their home directory.

  2. B

    Use the command sudo mkdir /home/devnet_user to manually create the directory before adding the user.

  3. C

    Verify the user's home directory permissions using the command ls -ld /home/devnet_user.

  4. D

    Assign a password to the user using the command sudo passwd devnet_user.

  5. E

    Use the command sudo userdel -r devnet_user to create the user and their home directory.

Show answer and explanation

Correct answers: A, C, D

Explanation

To manage users and directories in a Linux server, you can use the useradd command with appropriate flags to create a user and their home directory. After creation, it is essential to verify the permissions of the home directory to ensure the user has appropriate access. Additionally, assigning a password to the user is mandatory for enabling login. Manual directory creation or using commands meant for user deletion is not required in this scenario.

  • A. Correct.

    Correct: The useradd command with the -m and -d options will create the user, generate their home directory, and assign the specified path as the home directory.

  • B. Incorrect.

    Incorrect: Manually creating the directory is unnecessary since the useradd command with the -m option automatically creates the home directory.

  • C. Correct.

    Correct: The ls -ld command is a valid way to verify the permissions and ownership of the user's home directory.

  • D. Correct.

    Correct: The passwd command is necessary to set or update the password for the newly created user, enabling them to log in.

  • E. Incorrect.

    Incorrect: The userdel command is used to delete a user, not to create one. Using this command would remove the user and their home directory if it existed.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam