Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you want to collaborate on a project and share files, for example, you'll need to be in the same group with the other people on the team. Your first step is to find out which group you're in, as shown in Code Listing 5.3.
To find out which group you're in:
1. | grep yourid /etc/passwd Here, grep yourid pulls your userid out of the /etc/passwd file (which is where user information is stored) and displays it as shown in Code Listing 5.3. From left to right, you see:
|
2. |
Note the number of the group. You'll need the number to match it up with a group name in step 3. In this case, our group number is 500. |
3. | more /etc/group Here, we're exploring the contents of the /etc/group file using more to see which groups are currently defined on the system. As shown in Code Listing 5.4, the first column contains the name of the group, the second contains the group number, and the last column contains extra names the system administrator added to the group. Users can belong to multiple additional groups, and this is how the additional group membership is indicated. |
4. |
Match up the group number for your ID with the group name. Our number was 500, which corresponds to the ejr group name here. |