exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 21 discussion

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

SIMULATION -

Add user: user1, set uid=601 -

Password: redhat -
The user's login shell should be non-interactive.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# useradd -u 601 -s /sbin/nologin user1
# passwd user1
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
Dadash
8 months, 3 weeks ago
In RHEL 9 standart UID start from 1000. You can't create user with UID 601
upvoted 2 times
Lazylinux
3 months, 3 weeks ago
U R right but you can still create the account and you just get the following warning "useradd warning: user1's uid 601 outside of the UID_MIN 1000 and UID_MAX 60000 range" you can also overcome by customising your login.defs
upvoted 1 times
...
ly01
4 months, 4 weeks ago
This is not true. From /etc/login.defs: # Min/max values for automatic uid selection in useradd(8) # UID_MIN 1000 UID_MAX 60000 it is for *automatic* selection. You can specify manually whatever you want.
upvoted 1 times
...
...
deepbrown
1 year, 6 months ago
useradd -u 601 -s /sbin/nologin user1 ; echo "redhat" | passwd --stdin user1
upvoted 3 times
...
lgu
3 years, 1 month ago
useradd -u 601 -s /sbin/nologin user1 passwd user (enter redhat) cat /etc/passwd to check shell
upvoted 2 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 ...