Novell Certified Linux Professional (CLP) — Question 2
You want to add user tux to the southpole group without changing his primary group membership.
Which command do you use for this purpose?
Answer options
- A. useradd –g southpole tux
- B. usermod –g southpole tux
- C. groupadd –A tux southpole
- D. groupmod –A tux southpole
Correct answer: D
Explanation
The correct command is D, as 'groupmod' is used to modify an existing group and the '-A' option adds a user to that group without altering their primary group. Option A is incorrect because 'useradd' is for creating new users, while option B changes the primary group of the user. Option C is wrong as 'groupadd' is meant for creating new groups, not modifying existing ones.