EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 57


SIMULATION -

Create the user named eric and deny to interactive login.

Show Answer
Correct Answer:

To create a user named 'eric' and deny interactive login, you need to use the following commands: First, add the user with the specified shell using `useradd eric -s /sbin/nologin`. This command directly sets the shell that denies interactive login, preventing the need to edit the /etc/passwd file manually. You do not need to use `passwd eric` unless you want to set a password for the user, but it is not necessary for denying interactive login. The correct steps are: 1. `useradd eric -s /sbin/nologin`. This creates the user 'eric' and specifies that they cannot perform interactive logins by setting their shell to /sbin/nologin.

Discussion

1 comment
Sign in to comment
cloudyhr
Jan 5, 2022

#useradd eric -s /sbin/nologin