This is the mail archive of the 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: users and startup scripts (FAQ alert)

On Mon, 7 Jul 2003, Bill McCormick wrote:

> My /etc/.bash_profile doesn't seem to get executed. According to
> 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@localhost" (after setting up sshd, obviously).  I'm guessing the
above FAQ entry should be updated as well.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

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