Running two different profiles based on user loggin

Warren Young warren@etr-usa.com
Fri Oct 12 11:03:00 GMT 2007


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/



More information about the Cygwin mailing list