Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!husc6!rice!sun-spots-request From: rbj@dsys.ncsl.nist.gov (Root Boy Jim) Newsgroups: comp.sys.sun Subject: login.c, login shell, user-setable login gid Keywords: SunOS Message-ID: <327@brazos.Rice.edu> Date: 21 Jul 89 03:48:47 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 31 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 80, message 12 of 15 ? From: George A. Planansky ? I want to modify login.c, so it will query a user, asking for the user's ? desired group number (gid). We do accounting by charging usage to a ? user's gid -- there is a mapping between accounting projects and gid's. A ? modified login would let a user select what project will be billed, at ? login time. Never do real work when a simple kluge will do. In /etc/passwd put: rbj-11:WyEyDjUAPfVRU:602:11:Root Boy Jim:/u/rbj:/bin/tcsh rbj-22:WyEyDjUAPfVRU:602:22:Root Boy Jim:/u/rbj:/bin/tcsh In /etc/group put: foo:*:10:rbj-11,rbj-22 bar:*:22:rbj-11,rbj-22 Then simply login as rbj-11 or rbj-22. If you like, change the names rbj-11 and rbj-22 to rbj-foo and rbj-bar. Unfortunately, this restricts the real username length, but... Your 4.3 login will probably work. To test it, simply telnet to localhost after su'ing so you can back it out if need be. ? George Planansky, Atmosphere Environment Research, Cambridge Mass. ? 617 547-6207 Root Boy Jim Have GNU, Will Travel.