What is/are the standard CLI program(s) to manage users and groups?

Sadly, none of those operations were ever standardized.

Some operating systems offer this functionality as part of the OS, like Linux, but even if your Linux system includes them, over time and across Linux distributions the tools and their names changed so you can not really depend on a standard set of tools to do those tasks.

You need to have a per-operating system set of tools.


On Debian (and derived) systems, adduser and deluser are higher-level wrappers around useradd and related functionality. The cover user creation, group membership addition and subtraction, and user deletion. The corresponding commands from making/deleting groups are, sensibly enough, addgroup and delgroup. usermod appears to cover the remaining use case you name.


You mention Linux in the last part of your question, but since the title is generic I'll answer for FreeBSD.

FreeBSD has similar commands as Linux but they are commands passed to the pw utility:

pw useradd [user|uid] ...
pw usermod [user|uid] ...

and so on. However, one can parse the command into two parts: user and mod; a noun and a verb. Moreover, one can also use group and del:

pw groupdel [group|gid] ...

to, for example, delete a group. So here's what I think is really cool: the order doesn't matter, nor does the spacing! What this means, is that you can remember what to call by thinking about what you want to do (in English anyway):

pw del user [user|uid] ...
pw mod group [group|gid] ...
pw show user [user|uid] ...
pw next user [user|uid] ...

and more! The pw utility also lets you lock and unlock accounts:

pw lock [user|uid] ...
pw unlock [user|uid] ...

Options and any parameters that you pass are all standardized (although don't always apply to call commands) so memorization is minimized. All in all a nice way to do things.

Note: the ellipses in the above examples represent options and parameters passed to pw not additional users or groups.