Local Linux Accounts
Adding users with a UW userid
When creating accounts on a linux machine, we typically use the "adduser" command (in Ubuntu/Debian distributions). If you simply use the command "adduser username" it will create the account with a locally generated uid and gid matching the name and create a home directory. However, if we want to make sure that the uid and gid match the CS core for future possible compatibility, do the following (let's assume the userid is "imauser"):
1) Get the uid from the Math/CS idregistry (on cs-xh-admin.cs.private.uwaterloo.ca):
-
ssh cs-xh-admin.cs.private.uwaterloo.ca
-
idregistry Request Type=User imauser
- -->
imauser:91754
2) Get the gid from the Math/CS idregistry:
-
idregistry Request Type=Group imauser
- -->
imauser:7155
3) Add the required group name on the Linux system where you want the account, using the gid found in step 2:
-
# addgroup --gid 7155 imauser
4) Run the "adduser" command on the Linux system where you want the account, using the uid and gid found in steps 1 and 2:
-
# adduser --uid 91754 --gid 7155 imauser
Adding user `imauser' ...
Adding new user `imauser' (91754) with group `imauser' ...
Creating home directory `/home/imauser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for imauser
Enter the new value, or press ENTER for the default
Full Name []: Ima User
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Adding users without a UW userid