1NEWGRP(1) User Commands NEWGRP(1)
2
3
4
6 newgrp - log in to a new group
7
9 newgrp [-] [group]
10
12 The newgrp command is used to change the current group ID during a
13 login session. If the optional - flag is given, the user's environment
14 will be reinitialized as though the user had logged in, otherwise the
15 current environment, including current working directory, remains
16 unchanged.
17
18 newgrp changes the current real group ID to the named group, or to the
19 default group listed in /etc/passwd if no group name is given. newgrp
20 also tries to add the group to the user groupset. If not root, the user
21 will be prompted for a password if she does not have a password (in
22 /etc/shadow if this user has an entry in the shadowed password file, or
23 in /etc/passwd otherwise) and the group does, or if the user is not
24 listed as a member and the group has a password. The user will be
25 denied access if the group password is empty and the user is not listed
26 as a member.
27
28 If there is an entry for this group in /etc/gshadow, then the list of
29 members and the password of this group will be taken from this file,
30 otherwise, the entry in /etc/group is considered.
31
33 The following configuration variables in /etc/login.defs change the
34 behavior of this tool:
35
36 SYSLOG_SG_ENAB (boolean)
37 Enable "syslog" logging of sg activity.
38
40 /etc/passwd
41 User account information.
42
43 /etc/shadow
44 Secure user account information.
45
46 /etc/group
47 Group account information.
48
49 /etc/gshadow
50 Secure group account information.
51
53 id(1), login(1), su(1), sg(1), gpasswd(1), group(5), gshadow(5).
54
55
56
57shadow-utils 4.6 09/02/2019 NEWGRP(1)