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
prep4life
3 weeks, 6 days ago
adduser user1 -u 601 passwd user1 *prompts for password* enter redhat vim /etc/passwd arrow key down until you see user1:x:601:1003::home/user1:/bin/bash press i change it to... user1:x:601:1003::/home/user1:/sbin/nologin Press Esc Type :wq Press Enter to double check grep user1 /etc/passwd output: user1:x:601:1003::/home/user1:/sbin/nologin test to make sure account is unable to login su - user1 expected output: "This account is currently not available."
upvoted 1 times
...
Dadash
1 year ago
In RHEL 9 standart UID start from 1000. You can't create user with UID 601
upvoted 2 times
Lazylinux
7 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
8 months, 3 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, 10 months ago
useradd -u 601 -s /sbin/nologin user1 ; echo "redhat" | passwd --stdin user1
upvoted 3 times
...
lgu
3 years, 5 months 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago