SG(1) User Commands SG(1)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 id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5).
shadow-utils 4.5 01/25/2018 SG(1)
Check Out this Related Man Page
SG(1) User Commands SG(1)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 id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5).
shadow-utils 4.5 01/25/2018 SG(1)
Hi,
I need to extract information from a 4 GB file based on the following conditions:
1) Check for the presence of a set of account numbers
Each account number is present along with other information within
a PAGESTART and PAGEEND.
The file looks like this:
PAGESTART
ACCOUNT NO 123... (6 Replies)
Hi,
I have to write a shell script to sudo other account. Foreg,
i am working in account ramdev1, i have a sudo access where through shell script i need to sudo another account
ramdev2 and read a file "ram.inc" get those data and save it in a .txt file and return it?
Since i am new to... (21 Replies)
We have a program that when a new account is created using the webpage it creates a new directory on the linux filesystem for the account. The problem is the process that creates the directory is as root user, as I want ftpuser to be able to login I have to manually login and chown -R the... (1 Reply)
The requirement here is i'm searching for a particular word from the log file between two time stamp.
The process for particular account will happen, so i need to see there is any error occurred in between before it completes. in the below code yyyyy and xxxxx are two unique fields. initially... (1 Reply)