Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 7 Jul 2003 15:25:07 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Bill McCormick cc: cygwin AT cygwin DOT com Subject: Re: users and startup scripts (FAQ alert) In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 7 Jul 2003, Bill McCormick wrote: > My /etc/.bash_profile doesn't seem to get executed. According to > http://www.gnu.org/manual/bash-2.05a/html_chapter/bashref_6.html#SEC63 it > wouldn't, which is contrary to other posts I've seen and Cygwin docs. So > consequently, my bash.bashrc and ~/.bashrc do not get executed. > > /etc/profile does execute but where exactly is it called from? Is it called > from the executable? According to the "Bash Startup Files" section of the bash info page, bash looks for either [/etc/profile, ~/.bash_profile|~/.bash_login|~/.profile] when it's a login shell, and a [~/.bashrc] if it's a non-login shell. Also from there: So, typically, your `~/.bash_profile' contains the line `if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' after (or before) any login-specific initializations. Hope this helps. > On a different topic ... > > I ran mkpasswd -l > /etc/passwd and mkgroup -l /etc/group and still cannot > 'su' or 'login' as a different user from bash. Is there something else that > needs to be done after that? What is the preferred way to change users (su > or login) or should both work? > > I'm just getting started with cygwin so sorry if I missed the blindingly > obvious. > Bill See and . In short, "su" is not supported under Cygwin, and "login" won't work by default for any user other than SYSTEM (aka LocalSystem). The preferred method for switching users is by running "ssh user AT localhost" (after setting up sshd, obviously). I'm guessing the above FAQ entry should be updated as well. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/