0

During installation of Debian the default initial UID is 1000 and GID is 1000. When creating a user account during install, is there a way to specify their specific values, for example 3197?

  • During install? Don't think so... but after the fact, you can use useradd and specify GID and UID. – ivanivan Apr 20 '17 at 18:22
  • And you can skip creating that non-root user during install by preseeding or temporarily lowering the default question priority limit. – Ferenc Wágner Apr 24 '17 at 12:49
0

The installation creates one user for local administration. You should consider using a appropriate name for this user. This should be different from the user id you use normally if you want specific UIDs and GIDs.

The command for configuring users and groups allow you to specify the UID or GID respectively. However, if you want common userids on multiple systems you may want to use a different mechanism. You may want to consider:

  • LDAP which takes a little setup but is designed for this purpose.
  • An alternate password file which is syncronized by some mechanism.
  • Using a tool like ansible to add users.

If you use these techiques, please ensure your UIDs and GIDs don't get duplicated across systems.

As a last resort you can change the UID and GID in the /etc/passwrd and /etc/group files. Then you will need to chown all files owned by the user to the new UID and all files belonging to the group to the new group. If you do this early, only a few files in /home should need to be changed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.