X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <470F545A.10200@etr-usa.com> Date: Fri, 12 Oct 2007 05:02:50 -0600 From: Warren Young User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Cygwin-L Subject: Re: Running two different profiles based on user loggin References: <2478543e0710120356u3afffbcas42d41d1f7706fa79 AT mail DOT gmail DOT com> In-Reply-To: <2478543e0710120356u3afffbcas42d41d1f7706fa79@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Spencer Bailey wrote: > > I've created two different profiles in /etc. profile.1 and profile.2 > which both contain different aliases etc. Based on the user logging in > I want to be able to run the correct profile. > > Is it possible to put in a check in the /etc/profile that is a certain > user logs in to run the profile. Like... > > ---check for user "fred". If equal to fred > . /etc/profile.1 > > otherwise > > . /etc/profile.2 Unless you have many users and a nearly even split of users needing one profile over another, this is better handled in one of the per-user profiles: ~/.profile ~/.bash_profile ~/.bashrc The differences among these are subtle, but it's a topic for a generic Unix forum. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/