Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
RedQuasar
Highly Voted 3 years, 4 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 2 years, 6 months 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
...
sugisho
Most Recent 2 years, 9 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
2 years, 9 months ago
useradd user2 -G admin id user2 this syntax is vaild
upvoted 1 times
...
ionix
3 years ago
for i in 2 3; do useradd -G admin user$i; echo "redhat"|passwd --stdin user$i; done
upvoted 4 times
...
juliansaccount
3 years, 6 months ago
usermod -aG admin Using just G makes it the default group
upvoted 1 times
cytron
3 years, 5 months 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 ...