The Become project lets users change their effective group identity to a specified one through a command line, increasing efficiency.
Become is a unique tool that serves a specific purpose – changing the current effective (or real) user and group identity to those specified on the command line. After changing the IDs, the default shell is executed. The tool is ideal for users who need to switch between different user accounts or groups quickly.
Usage:
The tool is simple to use and requires only a few parameters. Users can specify the UID and GID numerically, and they don't have to be currently defined on the system. The following parameters are available:
• [ -chrv ] [uid][:gid]
The available options are:
• -c: This option clears supplementary groups.
• -h: Displays usage information.
• -r: Sets real IDs instead of effective IDs.
• -v: Increases verbosity.
Examples:
By default, become only changes the effective IDs and leaves any supplemental groups unchanged. The following example demonstrates this:
> become 666:666
euid=666, uid=0, egid=666, gid=0
$ id
uid=0(root) euid=666 gid=0(wheel) egid=666 groups=666, 0(wheel)
Supplementary groups are cleared when the "-c" option is used. The following example demonstrates this:
> become -c 123:123
euid=123, uid=0, egid=123, gid=0
$ id
uid=0(root) euid=123 gid=0(wheel) egid=123 groups=123
When the "-r" option is used, become effects real IDs rather than effective IDs. The following example demonstrates this:
> become -r 626:3203
euid=626, uid=626, egid=3203, gid=3203
$ id
uid=626 gid=3203 groups=3203, 0(wheel)
Conclusion:
In conclusion, Become is an excellent tool that helps users quickly switch between different user accounts or groups. The tool is easy to use and comes with various options, allowing users to customize its behavior. Those looking for a powerful yet straightforward tool to change user groups and IDs should give Become a try.
Version 1.0: N/A