2007-10-07 17:17:33 +05:30
|
|
|
.\" Title: sg
|
|
|
|
.\" Author:
|
|
|
|
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
|
|
|
.\" Date: 06/06/2006
|
|
|
|
.\" Manual: User Commands
|
|
|
|
.\" Source: User Commands
|
|
|
|
.\"
|
|
|
|
.TH "SG" "1" "06/06/2006" "User Commands" "User Commands"
|
2007-10-07 17:17:01 +05:30
|
|
|
.\" disable hyphenation
|
|
|
|
.nh
|
|
|
|
.\" disable justification (adjust text to left margin only)
|
|
|
|
.ad l
|
|
|
|
.SH "NAME"
|
|
|
|
sg \- execute command as different group ID
|
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.HP 3
|
|
|
|
\fBsg\fR [\-] [group\ [\-c\ ]\ command]
|
|
|
|
.SH "DESCRIPTION"
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
\fBsg\fR
|
|
|
|
command works similar to
|
|
|
|
\fBnewgrp\fR
|
|
|
|
but accepts a command. The command will be executed with the
|
|
|
|
\fI/bin/sh\fR
|
|
|
|
shell. With most shells you may run
|
|
|
|
\fBsg\fR
|
|
|
|
from, you need to enclose multi\-word commands in quotes. Another difference between
|
|
|
|
\fBnewgrp\fR
|
|
|
|
and
|
|
|
|
\fBsg\fR
|
|
|
|
is that some shells treat
|
|
|
|
\fBnewgrp\fR
|
|
|
|
specially, replacing themselves with a new instance of a shell that
|
|
|
|
\fBnewgrp\fR
|
|
|
|
creates. This doesn't happen with
|
|
|
|
\fBsg\fR, so upon exit from a
|
|
|
|
\fBsg\fR
|
|
|
|
command you are returned to your previous group ID.
|
|
|
|
.SH "FILES"
|
2007-10-07 17:17:33 +05:30
|
|
|
.TP 3n
|
2007-10-07 17:17:01 +05:30
|
|
|
\fI/etc/passwd\fR
|
2007-10-07 17:17:33 +05:30
|
|
|
User account information.
|
|
|
|
.TP 3n
|
2007-10-07 17:17:01 +05:30
|
|
|
\fI/etc/shadow\fR
|
2007-10-07 17:17:33 +05:30
|
|
|
Secure user account information.
|
|
|
|
.TP 3n
|
2007-10-07 17:17:01 +05:30
|
|
|
\fI/etc/group\fR
|
2007-10-07 17:17:33 +05:30
|
|
|
Group account information.
|
|
|
|
.TP 3n
|
2007-10-07 17:17:01 +05:30
|
|
|
\fI/etc/gshadow\fR
|
2007-10-07 17:17:33 +05:30
|
|
|
Secure group account information.
|
2007-10-07 17:17:01 +05:30
|
|
|
.SH "SEE ALSO"
|
|
|
|
.PP
|
2007-10-07 17:17:33 +05:30
|
|
|
|
2007-10-07 17:17:01 +05:30
|
|
|
\fBid\fR(1),
|
|
|
|
\fBlogin\fR(1),
|
|
|
|
\fBnewgrp\fR(1),
|
|
|
|
\fBsu\fR(1),
|
|
|
|
\fBgpasswd\fR(1),
|
|
|
|
\fBgroup\fR(5),
|
|
|
|
\fBgshadow\fR(5)
|