Xref: utzoo comp.unix.wizards:21409 comp.unix.questions:21351 comp.sources.wanted:11392 Path: utzoo!censor!geac!torsqnt!lethe!tvcent!comspec!rick From: rick@comspec.uucp (Rick McCalla) Newsgroups: comp.unix.wizards,comp.unix.questions,comp.sources.wanted Subject: newgrp type command Message-ID: <1990Apr11.144444.12446@comspec.uucp> Date: 11 Apr 90 14:44:44 GMT Distribution: tor Organization: Comspec Communications Inc., Toronto Ontario Canada Lines: 26 We are currently running SCO Xenix 2.3.3 - 386 version. The users on our system are all broken down into a variety of groups (gid) and must change group association for each package that they want to run. At login they are exec'd into a aprogram that runs them through the various packages. When they need to run a package belonging to another group they exec a program that has the sgid bit set to the appropriate group. I am trying to find a way of using newgrp in a manner similiar to 'su groupname -c "run this program' but am having no luck (newgrp also creates a new shell). Ideally this should be a little program that checks the /etc/group file for access permission to the group and then changes the gid and exits. If no permission is granted by /etc/group then the program should still exit without error but also without changing the gid bit. This program would be used on a command line to prefix the calling of the other program. Any help would be greatly appreciated. Rick -- Comspec Communications Inc. | Rick McCalla ----- rick@comspec.UUCP Toronto, Ontario Canada |---------------------------------- Voice : (416) 785 - 3553 | Path: uunet!mnetor!becker!comspec!rick Fax : (416) 785 - 3668 |