nerdexam
LPI

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…

Access Control

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)
  • A
    2% (1)
  • C
    5% (3)
  • D
    89% (49)
  • E
    4% (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 user syntax - no such subcommand exists in the ipa CLI toolset.
  • E uses ipa-user-add (hyphenated, wrong binary name) instead of the correct ipa user-add (space-separated subcommand), and --name is 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

#FreeIPA#user management#CLI#LDAP

Community Discussion

No community discussion yet for this question.

Full 303-300 Practice