303-300 · Question #26
Which of the following commands adds a new user usera to FreeIPA?
The correct answer is D. ipa user-add usera --first User --last A. ipa user-add is the correct FreeIPA CLI command for creating users, and option D uses the proper flags: --first for the first name and --last for the last name, which are required fields in FreeIPA's schema. Why the distractors fail: A uses useradd, which is the standard Linux…
Question
Which of the following commands adds a new user usera to FreeIPA?
Options
- Auseradd usera --directory ipa --gecos "User A"
- Bidap- useradd -H Idaps://ipa-server CN=UserA --attribs "Firstname: User: Lastname: A"
- Cipa-admin create user --account usera --fname User --iname A
- Dipa user-add usera --first User --last A
- Eipa-user- add usera --name "User A"
How the community answered
(55 responses)- A2% (1)
- C5% (3)
- D89% (49)
- E4% (2)
Explanation
ipa user-add is the correct FreeIPA CLI command for creating users, and option D uses the proper flags: --first for the first name and --last for the last name, which are required fields in FreeIPA's schema.
Why the distractors fail:
- A uses
useradd, which is the standard Linux local user command - it has no awareness of FreeIPA and those flags (--directory ipa,--gecos) don't create IPA-managed users. - B uses
idap-useradd(not a real command) and LDAP DN syntax - while FreeIPA is backed by LDAP, you don't interact with it using raw LDAP commands for user creation. - C invents a fictional
ipa-admin create usersyntax - no such subcommand exists in theipaCLI toolset. - E uses
ipa-user-add(hyphenated, wrong binary name) instead of the correctipa user-add(space-separated subcommand), and--nameis not a valid flag.
Memory tip: Think of FreeIPA's CLI as ipa <object>-<verb> - so for a user you want to add, it's ipa user-add. The required flags mirror a name form: --first and --last, just like filling out a first/last name field.
Topics
Community Discussion
No community discussion yet for this question.