Addgroup Vs Groupadd
Answer :
On most distribution adduser
and addgroup
are interactive 'convenience' wrappers around the commands useradd
and groupadd
.
You can find addgroup using the command which addgroup
, on my machine (Ubuntu 11.04) this lives in /usr/sbin/addgroup
.
On my box addgroup
is a perl script that prompts for various options (interactively) before invoking the groupadd
command.
groupadd
is usually preferable for scripting (say, if you wan't to create users in batch), whereas addgroup
is more user friendly (especially if you are unfamiliar with all the options and flags).
Of course addgroup
also takes many options via the command when you invoke it, but it is primarily intended as an interactive script.
Interestingly on my box addgroup
is a symlink to adduser
, the script checks the name it was invoked under and performs different actions accordingly.
groupadd
is more preferable for better cross-linux and sometimes cross-unix systems compatibility.
addgroup
is often just a wrapper over groupadd
(written in perl, source code here).
In the same way, useradd
is more preferable than adduser
- see here
Comments
Post a Comment