Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!oliveb!orc!bu.edu!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.wizards Subject: Re: Automatic login script execution Message-ID: <5644@buengc.BU.EDU> Date: 11 Apr 90 20:59:25 GMT References: <4147@uceng.UC.EDU> <262284c4.2013@petunia.CalPoly.EDU> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.wizards Organization: Boston Univ. Col. of Eng. Lines: 25 In article <262284c4.2013@petunia.CalPoly.EDU> apippin@polyslo.CalPoly.EDU (Pinhead@Spikes) writes: > >Add then schriste@uceng.UC.EDU (Steven V. Christensen) babbles... >~Can anyone point me to a login.c replacement which causes a global >~.login file to be executed first? I assume I would place a "source ~/.login" >~as the last line of this global file. > > Put a file ~/.login with owner root and mode 644. The last > line should source ~/.userlogin, if it exists. Then the user does rm .login and unless root owns his home directory, it's gone. You'd have to have root own his home directory. You could create a subdirectory owned by the user for the user's files. Then you could maybe write a setuid-root C program that allows the user to write files into the root-owned home directory, but not overwriting the .login file. --Blair "Or you could give them the root password..."