Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site ea.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!ea!mwm From: mwm@ea.UUCP Newsgroups: net.unix Subject: Re: how do you handle multiple accounts? - (nf) Message-ID: <13400008@ea.UUCP> Date: Thu, 12-Jul-84 18:48:00 EDT Article-I.D.: ea.13400008 Posted: Thu Jul 12 18:48:00 1984 Date-Received: Sun, 15-Jul-84 02:17:07 EDT References: <1460@sri-arpa.UUCP> Lines: 24 Nf-ID: #R:sri-arpa:-146000:ea:13400008:000:987 Nf-From: ea!mwm Jul 12 17:48:00 1984 #R:sri-arpa:-146000:ea:13400008:000:987 ea!mwm Jul 12 17:48:00 1984 We had a similar problem: we do consulting work, and need to charge CPU time back to clients (Gotta pay for the VAX somehow). We used the group codes to handle it. Everybody logs into a program called project, which asks for an account number to bill this session to. It then sets the group ID to that number (after checking that it's a valid number) and execl's a shell. Project can also be run interactively to fire up multiple shells to work on different projects, etc. The only thing after that was a program to read /usr/adm/acct (thanks to uokvax!raymond), and an awk script to turn what falls out of the program into hours. The problem is, you either have to be running a system with mutli-group processes (4.2), or give up group protection for the ids involved. We run 4.2 so the project program would have to be modified to handle non-multi-group systems. This all works with no changes to the system, etc. I'll post/mail the three programs involved if someone asks.