Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!ames!ptsfa!ihnp4!cuae2!killer!jfh From: jfh@killer.UUCP (The Beach Bum) Newsgroups: comp.unix.questions Subject: Re: execing a shell & .profile Message-ID: <1261@killer.UUCP> Date: Fri, 31-Jul-87 18:59:47 EDT Article-I.D.: killer.1261 Posted: Fri Jul 31 18:59:47 1987 Date-Received: Sun, 2-Aug-87 09:44:57 EDT References: <8528@brl-adm.ARPA> Organization: Big "D" Home for Wayward Hackers Lines: 28 Summary: make the name -sh in argv[0] when you exec /bin/sh In article <8528@brl-adm.ARPA>, drears@ARDEC.arpa (FSAC) writes: > The program sets up a environment for them and then execs /bin/sh. > The person is then placed in that group account. What I would like to > do is have the shell execute the .profile and possibly /etc/profile. > Is there any way I can tell /bin/sh to execute .profile or > /etc/profile? I know I can have the user type . .profile but I do not > want this. sure, the manual page for the shell, under the section marked `Invocation' states, and i quote, "If the shell is invoked through exec(2) and the first character of argument zero is -, commands are initially read from /etc/profile and from $HOME/.profile, if such files exist." -- Plexus Sys5 Unix User's Reference Manual. this has been a fairly constant feature of unix since the old days, except that /etc/profile was added sometime around system 3 days. you will need to do something about the $HOME/.profile mess, such as set $HOME to the correct directory for the group. - john. -- John F. Haugh II HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 "Don't Have an Oil Well?" Dallas, TX. 75243 " ... Then Buy One!" (214) 231-0993