On 30 July 2013 17:50, PHILIPP, Axel, Dr. <[email protected]> wrote: > On a SUSE Linux Enterprise Desktop 11 (x86_64) SP2 system newgrp --man or > --help or --usage kills the shell: > cp003421> /bin/ksh > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 16082 15496 0 17:24 pts/1 00:00:00 /bin/ksh > cp003421> ps -fp $PPID > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421> newgrp --man > newgrp: unrecognized option '--man' > Try `newgrp --help' or `newgrp --usage' for more information. > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421> /bin/ksh > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 16163 15496 0 17:26 pts/1 00:00:00 /bin/ksh > cp003421> ps -fp $PPID > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421> newgrp --help > Usage: newgrp [-l|-c command] [group] > newgrp - change the effective group id > > -l, --login reinitialize environment as if logged in > -c command Execute `command' with new group > --help Give this help list > -u, --usage Give a short usage message > -v, --version Print program version > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421> /bin/ksh > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 16263 15496 0 17:27 pts/1 00:00:00 /bin/ksh > cp003421> newgrp --usage > Usage: newgrp [-l|-c command] [group] > cp003421> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421> echo $KSH_VERSION > Version AJM 93u+ 2012-08-01 > > cp003421_home> ksh93v > cp003421_home> echo $KSH_VERSION > Version AIJM 93v- 2013-07-24 > cp003421_home> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 16962 15496 0 17:36 pts/1 00:00:00 > /ya/yae55/yae5511/x/6223C_USER/astksh/arch/linux.i38 > cp003421_home> ps -fp $PPID > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > cp003421_home> newgrp --usage > Usage: newgrp [-l|-c command] [group] > cp003421_home> ps -fp $$ > UID PID PPID C STIME TTY TIME CMD > yae5511 15496 15494 0 17:19 pts/1 00:00:00 ksh > > cp003421> whence -va newgrp > newgrp is a special shell builtin > newgrp is /usr/bin/newgrp > newgrp is an undefined function > cp003421> whence -p newgrp > /usr/bin/newgrp > cp003421> whence -va newgrp > newgrp is a special shell builtin > newgrp is /usr/bin/newgrp > newgrp is a tracked alias for /ya/yae55/yae5511/newgrp > cp003421> ll /ya/yae55/yae5511/newgrp > ls: cannot access /ya/yae55/yae5511/newgrp: No such file or directory > > This also affects both versions.
AFAIK newgrp is a builtin which directly calls exec() to run /usr/bin/newgrp. The exec() of course replaces the current shell process. What may be nice would be a setgid or setegid builtin to switch the default user group. Does anyone know a shell which has something like that? Ced -- Cedric Blancher <[email protected]> Institute Pasteur _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
