🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #890

Re: Loginwindow agruments

#890
From: David Lemson
Date: Sun, 09 Aug 1992 01:25
20 lines
1425 bytes
elitman@rac2.wam.umd.edu (Eric A. Litman) writes:

>Does loginwindow pass arguments to Login/LogoutHook? Specifically, I'd like
>to be able to exec certain processes as root within the system *Hook files,
>while others would run under the uid of the current user.

Yes, the username of the currently logging-in user is passed to
LoginHook as the first argument.  I don't know for sure about LogoutHook,
I haven't really cared who was logging out my LogoutHook scripts (I
generally just do a 'dim 0' in LogoutHook).

To do this, the easiest way is probably just to make LoginHook a
shell script and say:
su $1 -c "/usr/bin/commandtorunasthem"
whenever you want something run as that user.
-- 
David Lemson                                                 (217) 244-1205
University of Illinois NeXT Campus Consultant  / CCSO NeXT Lab System Admin
Internet : lemson@uiuc.edu                 UUCP :...!uiucuxc!uiucux1!lemson 
NeXTMail accepted                                   BITNET : LEMSON@UIUCVMD
Technical Details
Message-ID: <BsozzI.EJn@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!lemson
References: <1992Aug8.235832.16941@wam.umd.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!lemson
From: lemson@ux1.cso.uiuc.edu (David Lemson)
Subject: Re: Loginwindow agruments
Message-ID: <BsozzI.EJn@ux1.cso.uiuc.edu>
Organization: University of Illinois at Urbana
References: <1992Aug8.235832.16941@wam.umd.edu>
Date: Sun, 9 Aug 1992 01:25:52 GMT
Lines: 20