Need to use newgrp or equivalent

John F. Haugh II jfh at rpp386.Dallas.TX.US
Sat Nov 5 09:17:11 AEST 1988


In article <1843 at cbnews.ATT.COM> lml at cbnews.ATT.COM (L. Mark Larsen) writes:
>Assuming you are using the standard /bin/sh, turning on the setuid bit
>of /bin/newgrp is unlikely to have any impact since the newgrp command
>is a built-in command (also built-in in ksh).  Without further details,
>it is hard to say what might be the problem.  Suffice it to say that
>newgrp works fine in SysV UNIX.

/bin/newgrp is the correct place to look.  If it is not SUID root, then
it is guaranteed to not work.  The shell treats the newgrp command
specially by exec'ing /bin/newgrp without fork'ing first.

-rws--x--x   1 root     bin        13361 Apr 13  1987 /bin/newgrp

That is the ls -l output for /bin/newgrp here.  Your permissions should
be similiar.  Everything else is probably different ...  Your milage may
vary ;-)
-- 
John F. Haugh II                        +----Make believe quote of the week----
VoiceNet: (214) 250-3311   Data: -6272  | Nancy Reagan on Richard Stallman:
InterNet: jfh at rpp386.Dallas.TX.US       |          "Just say `Gno'"
UucpNet : <backbone>!killer!rpp386!jfh  +--------------------------------------



More information about the Comp.unix.wizards mailing list