I'm basically asking about user management from the command line (e.g. on a system where there are no graphical tools available). In the past I've used several different programs to add or delete users and groups or to modify their attributes: adduser, useradd, usermod, gpasswd, and perhaps others I've forgotten. I've also heard a couple times that some of these programs are low-level and should be avoided for general use, but I can never remember which. So I'd like to get a definitive answer for which programs are the recommended ones for at least the following tasks:
- Create a new user
- Add a user to a group
- Remove a user from a group
- Change a user's primary group
- Change a user's login shell or home directory
- Delete a user
I'm looking for standard tools which I can expect to be available on pretty much any Linux system (of any distribution).
groupmod. I'm not going to make this an answer.... but the most standard way is probably to use your text editor... remember the files affected are just delimited text./etc/passwdwas just one part of a complex system)