newgrp
PURPOSE
Changes your primary group identification.
SYNOPSIS
newgrp [-] [ group ]
DESCRIPTION
The newgrp command changes your primary group identifica-
tion to group. newgrp recognizes only group names, not
group ID numbers. Without an argument, it changes your
primary group to the one specified in the /etc/passwd
file.
If the group has a password and you do not or if the
group has a password and you are not listed in the
/etc/group file as a member, then newgrp asks you for the
group password. (The use of group passwords is not
encouraged because, by their very nature, they encourage
poor security practices.)
Note: Any active user-generated shell will be terminated
when newgrp is used.
FLAG
- Changes the environment to the login environment of
the new group.
EXAMPLES
1. To change the primary group ID of the current shell
session to admin:
newgrp admin
2. To change the primary group ID back to your original
login group:
newgrp
FILES
/etc/group Group file; contains group ids.
/etc/passwd Password file; contains user ids.
RELATED INFORMATION
The following commands: "login" and "users, adduser."
The group and passwd files in Installing and Customizing
the AIX Operating System.