[Next] [Previous] [Up] [Top] [Contents]

3.1 Logging in

3.1.4 Identity

The system identifies you by the user and group numbers (userid and groupid, respectively) assigned to you by your system administrator. You don't normally need to know your userid or groupid as the system translates username « userid, and groupname « groupid automatically. You probably already know your username; it's the name you logon with. The groupname is not as obvious, and indeed, you may belong to more than one group. Your primary group is the one associated with your username in the password database file, as set up by your system administrator. Similarly, there is a group database file where the system administrator can assign you rights to additional groups on the system.

In the examples below % is your shell prompt; you don't type this in.

You can determine your userid and the list of groups you belong to with the id and groups commands. On some systems id displays your user and primary group information, e.g.:

% id

uid=1101(frank) gid=10(staff)

on other systems it also displays information for any additional groups you belong to:

% id

uid=1101(frank) gid=10(staff) groups=10(staff),5(operator),14(sysadmin),110(uts)

The groups command displays the group information for all the groups you belong to, e.g.:

% groups

staff sysadmin uts operator


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]