exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 2 discussion

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

SIMULATION -
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users: harry, Natasha is the admin group. The user: tom's login shell should be non-interactive.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# useradd -G admin harry
# useradd -G admin natasha
# useradd -s /sbin/nologin tom
# id harry;id Natasha (Show additional group)
# cat /etc/passwd
(Show the login shell)

OR -
# system-config-users

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
cloudsinair
Highly Voted 1 year, 6 months ago
RHEL 9.1 [root@server9 ~]# [root@server9 ~]#groupadd admin [root@server9 ~]# [root@server9 ~]# useradd harry -G admin [root@server9 ~]# useradd natasha -G admin [root@server9 ~]# [root@server9 ~]# useradd -s /sbin/nologin tom [root@server9 ~]#
upvoted 8 times
ly01
4 months, 4 weeks ago
it's all correct, I can't just understand if I have to read the question verbatim (but there is no admin group out of the box) or add them to the wheel group.
upvoted 1 times
...
...
thomasstate
Most Recent 1 year ago
apart from the shell /sbin/nologin, which other is mostly use for user
upvoted 1 times
...
dunia
1 year, 2 months ago
hello all , in the exam there is two connections which connection we should edit ?the active one ( the first connection ) we modify the existing OR we edit the second connection ? please anyone can answer?
upvoted 2 times
...
thiruppathij
1 year, 2 months ago
[root@servera ~]# groupadd admin [root@servera ~]# useradd harry [root@servera ~]# useradd natasha [root@servera ~]# useradd tom -s /sbin/nologin verify- commands [root@servera ~]# cat /etc/passwd [root@servera ~]# cat /etc/group or else #cat /etc/group | grep admin #cat /etc/passwd | grep tom
upvoted 2 times
...
Rahul95
1 year, 6 months ago
#useradd harry #useradd natasha #useradd tom -s /sbin/nologin #groupadd admin #usermod -G admin harry #usermod -G admin natasha #cat /etc/group | grep admin - to verify #cat /etc/passwd | grep tom
upvoted 3 times
...
BitterOldMan
1 year, 9 months ago
Oops, answering my own question, capital -G does the append.
upvoted 1 times
...
BitterOldMan
1 year, 9 months ago
The task says to add additional group admin, so shouldn't the command be: useradd -aG admin harry
upvoted 1 times
wajdi005
1 year, 9 months ago
You can do that, but the -G is also correct because the users are new. So you wont overnight any permissions.
upvoted 2 times
...
...
nailimvali
2 years, 1 month ago
*** useradd -s /sbin/nologin tom
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 ...