CINXE.COM

sg

<html> <head> <title>sg</title> <META NAME="KEYWORDS" CONTENT="sg"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>sg</b></h1></center> <PRE> <STRONG><A HREF="/man1/SG">SG(1)</A></STRONG> User Commands <STRONG><A HREF="/man1/SG">SG(1)</A></STRONG> NAME sg - execute command as different group ID SYNOPSIS sg [-] [group [-c ] command] DESCRIPTION The sg command works similar to newgrp but accepts a command. The command will be executed with the /bin/sh shell. With most shells you may run sg from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially, replacing themselves with a new instance of a shell that newgrp creates. This doesn't happen with sg, so upon exit from a sg command you are returned to your previous group ID. CONFIGURATION The following configuration variables in /etc/login.defs change the behavior of this tool: SYSLOG_SG_ENAB (boolean) Enable "syslog" logging of sg activity. FILES /etc/passwd User account information. /etc/shadow Secure user account information. /etc/group Group account information. /etc/gshadow Secure group account information. SEE ALSO <STRONG><A HREF="/man1/id">id(1)</A></STRONG>, <STRONG><A HREF="/man1/login">login(1)</A></STRONG>, <STRONG><A HREF="/man1/newgrp">newgrp(1)</A></STRONG>, <STRONG><A HREF="/man1/su">su(1)</A></STRONG>, <STRONG><A HREF="/man1/gpasswd">gpasswd(1)</A></STRONG>, <STRONG><A HREF="/man5/group">group(5)</A></STRONG>, <STRONG><A HREF="/man5/gshadow">gshadow(5)</A></STRONG>. shadow-utils 4.8.1 02/06/2024 <STRONG><A HREF="/man1/SG">SG(1)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10