[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 How Become handles groups

As well as handling changes of user id, Become also changes group ids. The exact changes Become makes are under user control.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3.1 Choosing a new primary group

By default, the primary group is chosen according to the login style (see section Login styles): the `preserve' style retains the current primary group, while `set-user' and `login' styles choose the target's primary group.

You can override Become's default choice using the --group (-g for short) option:

 
become --group=group

The chosen group may be either a group name or a numeric gid. The group must be one of the following:

Become will raise an error if this isn't the case.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3.2 Handling subsidiary group memberships

Subsidiary group memberships are a powerful tool for managing permissions under Unix. Traditionally, they tend to be tied to particular users. Become tries to be sightly more intelligent about group memberships.

Become has a concept of group style, analogous to login style (see section Login styles). The styles are selected by giving command line arguments:

-k
--keep-groups

Retain the existing group memberships; don't add any new groups.

-m
--merge-groups

Merge group memberships of the target user with the exiting memberships.

-r
--replace-groups

Replace the existing group memberships with the target user's memberships.

Again, the defaults are dependent on the chosen login style. Both `preserve' and `set-user' merge group memberships; the `login' style replaces the set of groups.

Note that you can do perverse things like replace all the subsidiary groups but retain your primary group (using the --group option; see section Choosing a new primary group) if you like: Become won't try to stop you.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Mark Wooding on March, 14 2006 using texi2html 1.76.