This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running two different profiles based on user loggin


"Spencer Bailey" wrote:

> Hi,
>
> 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


Generic Unix advice, untested, should work on cygwin AFAICS:

if test "$USER" = fred; then
   . /etc/profile.1
else
   . /etc/profile.2
fi

Regards - M


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]