Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 22 of 33
Free Preview · 33 of 108 · questions 1–33 of 108 are free. Sign up free to sync your progress across devices.
Hotspot Scenario
Select the appropriate option to complete the statement. Click Check Answer below to see the marked solution.
Hotspot Solution:
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 ~]#
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
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
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 ~]#
[root@abc ~]# passwd user2 --stdin Changing password for user user2. redhat passwd: all authentication tokens updated successfully. [root@abc ~]#