exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 22 discussion

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

SIMULATION -
Add users: user2, user3.
The Additional group of the two users: user2, user3 is the admin group Password: redhat

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# useradd -G admin user2
# useradd -G admin user3
# passwd user2
redhat
# passwd user3
redhat

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
RedQuasar
Highly Voted 3 years, 11 months ago
useradd -G admin user2 useradd -G admin user3 echo “redhat” | passwd --stdin user2 echo “redhat” | passwd --stdin user3
upvoted 7 times
...
gunwantk
Highly Voted 3 years, 1 month ago
Make steps simple, more complex commands are confusing, [root@station ~]# cat /etc/group | grep -i admin [root@station ~]# [root@station ~]# groupadd admin [root@station ~]# [root@station ~]# useradd user2 [root@station ~]# passwd user2 [root@station ~]# useradd user3 [root@station ~]# passwd user3 [root@station ~]# [root@station ~]# [root@station ~]# id user2 uid=1004(user2) gid=1007(user2) groups=1007(user2) [root@station ~]# id user3 uid=1005(user3) gid=1008(user3) groups=1008(user3) [root@station ~]# [root@station ~]# usermod -a -G admin user2 [root@station ~]# usermod -a -G admin user3 [root@station ~]# [root@station ~]# id user3 uid=1005(user3) gid=1008(user3) groups=1008(user3),1006(admin) [root@station ~]# id user2 uid=1004(user2) gid=1007(user2) groups=1007(user2),1006(admin) [root@station ~]#
upvoted 6 times
...
Lazylinux
Most Recent 5 months ago
useradd -m -G admin user2 useradd -m -G admin user3 verify lid user2 lid user3 Now passwd passwd user2 passwd user3 Verify su user2 > should allow access su user3 > should allow access
upvoted 1 times
...
sugisho
3 years, 4 months ago
[root@abc ~]# passwd user2 --stdin Changing password for user user2. redhat passwd: all authentication tokens updated successfully. [root@abc ~]#
upvoted 1 times
...
sugisho
3 years, 4 months ago
useradd user2 -G admin id user2 this syntax is vaild
upvoted 1 times
...
ionix
3 years, 8 months ago
for i in 2 3; do useradd -G admin user$i; echo "redhat"|passwd --stdin user$i; done
upvoted 4 times
...
juliansaccount
4 years, 2 months ago
usermod -aG admin Using just G makes it the default group
upvoted 1 times
cytron
4 years ago
This is correct when you modifying existing user and adding more supplementary groups but if you creating new user you can use just -G for supplementary/additional group.
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 ...