1SG(1)                            User Commands                           SG(1)
2
3
4

NAME

6       sg - execute command as different group ID
7

SYNOPSIS

9       sg [-] [group [-c ] command]
10

DESCRIPTION

12       The sg command works similar to newgrp but accepts a command. The
13       command will be executed with the /bin/sh shell. With most shells you
14       may run sg from, you need to enclose multi-word commands in quotes.
15       Another difference between newgrp and sg is that some shells treat
16       newgrp specially, replacing themselves with a new instance of a shell
17       that newgrp creates. This doesn't happen with sg, so upon exit from a
18       sg command you are returned to your previous group ID.
19

CONFIGURATION

21       The following configuration variables in /etc/login.defs change the
22       behavior of this tool:
23
24       SYSLOG_SG_ENAB (boolean)
25           Enable "syslog" logging of sg activity.
26

FILES

28       /etc/passwd
29           User account information.
30
31       /etc/shadow
32           Secure user account information.
33
34       /etc/group
35           Group account information.
36
37       /etc/gshadow
38           Secure group account information.
39

SEE ALSO

41       id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5).
42
43
44
45shadow-utils 4.6                  05/11/2019                             SG(1)
Impressum