Hot answers tagged


This is a bare minimum script to get the job done. It makes sure that neither the username nor the uid is already in use. It makes a matching group for each user (with gid=uid) - it doesn't check if the gid or group name already exists (left as an exercise for the reader - hint: use getent group). Note: the script below is untested but I've written ...

Only top voted, non community-wiki answers of a minimum length are eligible