Can my alter-ego use "at"?

Hershel Belkin belkin at teecs.UUCP
Fri Jun 29 10:19:30 AEST 1990


Can anyone tell me if there is any way to scedule a process using
"at" or crontab but have it run under a group ID that is different
than one's login group ID?  (Of course, I'm assuming that the user
is a valid member of the group!)

I've looked, but have not been able to come up with a solution (other
than have a separate login entry for the user under a different group..
but that isn't a viable solution)

The problem is that newgrp replaces your shell, so that your
execution script no longer runs, and it has no provision (or none
that I've seen) for passing the name of a script to run when it
starts up.  I even tried doing a newgrp with the "-" option and then
using .profile to kick on the script, but that results in a lot of 
loud complaining (via mail) since the login is not from an interactive
device!

Is this such an unusual thing to want to do?  Am I missing something obvious?
Our users are often involved in numerous projects, which we control
via the group ID mechanism.  Often they would like to scedule some
jobs to run a less-busy times, like overnight.  But the jobs may relate
to various projects, and require specific group ID settings in order to
access certain directories, programs, etc.

Another possible solution is writing a small C program (with setgid bit set)
to start up the script, but these users can't set the setgid bit, so 
that means a lot of work for me! (And besides, it seems like a poor
security decision to have such programs lying around).

Any help out there?  Has someone already solved this one?  (Even a manual
reference would be welcomed :-)
Thanks

-- 
+-----------------------------------------------+-------------------------+
| Hershel Belkin               hp9000/825(HP-UX)|      UUCP: teecs!belkin |
| Test Equipment Engineering Computing Services |     Phone: 416 246-2647 |
| Litton Systems Canada Limited       (Toronto) |       FAX: 416 246-5233 |
+-----------------------------------------------+-------------------------+



More information about the Comp.unix.wizards mailing list