exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 8 discussion

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

SIMULATION -
Create a user named alex, and the user id should be 1234, and the password should be alex111.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# useradd -u 1234 alex
# passwd alex
alex111
alex111

OR -
echo alex111|passwd -stdin alex

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
ogwogwo
1 year, 2 months ago
With The answers I see, it makes the uid and the gid the same while the question asks only the uid to be changed.
upvoted 1 times
smdrouiss
6 months, 1 week ago
It doesn't mention the group ID
upvoted 1 times
...
...
Rahul95
1 year, 6 months ago
#useradd -u 1234 alex #passwd alex - it will ask for new password for user alex #cat /etc/passwd | grep alex or id alex - to verify
upvoted 3 times
...
ktd971
1 year, 10 months ago
useradd -u 1234 -p alex111 -m alex
upvoted 4 times
Lazylinux
3 months, 3 weeks ago
WRONG: You cannot use -p as the password will be encrypted and no one would now it, it maybe useful for service accounts that are system managed - i like to use this and can save time if have multiple users => for user in alex; do useradd -m -G -s 1234 $user; echo "alex111" | passwd --stdin $user; done Remember: G to add to grp membership and you can add any other option and if more than one user with i.e. nologin and different passwd then just replace username at start but if all shares same passwd and group membership then saves you time as some questions require that
upvoted 1 times
...
...
Mayowa15
2 years ago
#useradd alex -u 1234 #passwd alex #alex111 #alex111
upvoted 1 times
...
SOAPGUY
2 years, 2 months ago
one more '-' needed; echo alex111 | passwd --stdin alex
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 ...