exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 58 discussion

Actual exam question from RedHat's EX200
Question #: 58
Topic #: 1
[All EX200 Questions]

SIMULATION -
Create the user named eric and deny to interactive login.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
useradd eric
passwd eric
vi /etc/passwd
eric:x:505:505::/home/eric:/sbin/nologin
Which shell or program should start at login time is specified in /etc/passwd file? By default, Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/ false instead of login shell.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
cloudyhr
Highly Voted 2 years, 11 months ago
#useradd eric -s /sbin/nologin
upvoted 7 times
...
Lazylinux
Most Recent 3 months, 2 weeks ago
$useradd -m -s /sbin/nologin eric; echo "password" | passwd --stdin eric use above in case future wise you may need to enable it and also to test it as per below..always test DO NOT assume!! $ssh eric@localhost => put password you should get below message This account is currently not available. onnection to localhost closed.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...