22.13 Groups and Group OwnershipGroup membership is an important part of UNIX security. All users are members of one or more groups, as determined by your entry in /etc/passwd (36.3 ) and the /etc/group file. To find out what groups you belong to, " grep (27.1 ) for" your entry in /etc/passwd : % [If that didn't work, try a command like % Or use % [Or With BSD UNIX, you're always a member of all your groups. This means that I can access files that are owned by the staff , power , and weakness groups, without doing anything in particular. Under System V UNIX, you can only be "in" one group at a time, even though you can be a member of several. (I suppose this is like social clubs; you can belong to the Elks and the Odd Fellows, but you can only wear one silly hat at a time.) If you need to access files that are owned by another group, use the newgrp command: % (System V even lets you change to groups that you don't belong to. In
this case, you have to give a group password
. Group passwords are
rarely used - usually, the password field is filled with a On most systems, there are groups for major projects or departments, groups for system administration, and maybe one or two groups for visitors. Some BSD-based systems have a wheel group; to become root (1.24 ) , you must belong to wheel . Many systems make terminals writable only by the owner and a special group named tty ; this prevents other users from sending characters to your terminal without using an approved setgid (1.23 ) program like write (1.33 ) . - |
|