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)
I have an SGI running IRIX 6.5
The prob is when i login as user
and open a file , it gives me error as "OUT OF MEMORY"
when i su or login as root . THis error disappers
I have lot of space in the System .
Thanx
DPai (7 Replies)
Hie,
Im having 2 Questions. Please help.
- Do Anyone know how to accessanother HDD using Linux? Ive tried many ways before but unable to do so. Im using 2 HDD, The main Hdd/Partition where my unix is are using Seagate HDD 20GB , another HDD is using Maxtor 20GB. From my seagate Hdd where my... (8 Replies)
Hi everybody !
How can I configure the ftp in solaris systems ? Wich files ?
To resume : I want to create a user wich can get from a ftp session running from a PC, some files without going up in the directories. If I attached the ksh or sh shell to the user, he can go wherever he wants. If I... (7 Replies)
im having trouble with moving files in a directory into /dev/null
for file in $HOME/.trashcan/
do
mv $file /dev/null
done
the error msg i get is:
mv: /dev/null: not a directory.
does anyone know how to fix this?
thanks
primal (16 Replies)
hi,all
i have in trouble about msgget.
i create a queue and the program like blow:
openMsg( pid_t key )
{
....
int msgid;
....
msgid=msgget(key,IPC_CREAT|IPC_EXCL|0666)
if( msgid<=0 ){
fprintf( stdout,"%s,%d",strerror(errno),errno );
return -1;
... (9 Replies)
Oct 22 01:01:47 sendmail: My unqualified host name unknown; sleeping for retry
Oct 22 01:02:47 sendmail: unable to qualify my own domain name -- using short name
how to resolve this error
thanks (11 Replies)
Hi,
i am working in C in Fedora Eclipse 3.3.0 with gdb debugger. I am geting segmentation fault with an error message "mi_cmd_var_create: unable to create variable object" on debugging the program.
What should I do to solve this problem?
rgds,
Dona_m (14 Replies)
Hi friends,
Please suggest a solution for this.
A script has following things.
echo "Enter P for PML"
echo "Enter V for VVL"
echo "Enter L for LNL"
echo "Enter G for GDL"
read choice
echo ${choice} >> LOG_Daily.txt
if operator enters anything other that P/V/L/G it should show an... (8 Replies)
Can anyone explain?
I start my unix session on AIX, run tcsh move to a particular directory, let say: cd /test/bin and next i run a command like:
grep "test string" /test/bin/*
to look for the string in any files in the directory.
I am getting a response of Killed.
Why is that... (16 Replies)
Hi experts,
I found-
$ tail -f /var/adm/messages
....
....
Jan 17 05:16:31 server01b last message repeated 6 times
Jan 17 05:17:05 server01c ufs: NOTICE: alloc: /var/fileserver:file system full
but I checked with df -k and found /var/fileserver is only 49% is used. It means... (7 Replies)
# whoami 2>/dev/null
whoami: not found
#
Why the error message not getting redirected to /dev/null ...
The shell is
# echo $SHELL
/sbin/sh
For other commands it is working
# ls aaa 2>/dev/null
#
Is there any other way to redirect the err msg from whoami Thank you for your... (7 Replies)
hi I have problem with understanding setuid and setgid
in system I have following users:
$id -a marek
uid=1001(marek) gid=1001(marek) groups=1001(marek),1002(uzivatelia)
$id -a cepi
uid=1000(cepi) gid=1000(cepi)... (7 Replies)
Hi there,
I just want to know how can I redirect error msgs returned from running a command (e.g. nslookup) and then only print out the correct output using an if statement?.
I've tried the following:
where $a is a list of IPs.
but I got all the error msgs printed out to screen and... (9 Replies)
Hi there,
I miss date information when executing # dmesg
Is it possible to add this a date information to my results of # dmesg
?
Best wishes (12 Replies)
Greetings:
I am posting this because my searches for this problem only came up with two posts and no helpful suggestions. I have a "solution" (read work-around hack) and have not tried yet to find a root cause, and may never because I am busy doing other things (read working to pay the bills).
... (10 Replies)