delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/15/20:26:36

X-Spam-Check-By: sourceware.org
Message-ID: <455BBE2F.6090608@cygwin.com>
Date: Wed, 15 Nov 2006 20:26:07 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060916 Fedora/1.5.0.7-1.fc4.remi Thunderbird/1.5.0.7 Mnenhy/0.7.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Windows environment variables in ssh sessions with privilege seperation
References: <1163631780 DOT 4704 DOT 66 DOT camel AT Ruksana DOT schrodinger DOT com>
In-Reply-To: <1163631780.4704.66.camel@Ruksana.schrodinger.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Sean Morgan wrote:
> I have cygwin sshd installed using privilege separation but find that
> when connected via ssh that neither the windows system nor user
> variables are present in the bash shell as they are when cygwin is run
> in a command shell from the Windows desktop.
> 
> Could someone explain to me why this might be or how it might be
> corrected? My goal is that whether a user connects via ssh or starts a
> shell from the Windows GUI that they have a consistent bash environment.


This has been discussed before.  A minimal shell environment is communicated
to each session started via 'ssh'.  This is to limit security holes.  Either
of the two options below is your alternative.


> I suspect that the root of this problem lies in the privilege separation
> but I don't think I can get away from this if I want to use network
> shares with smbntsec. I am considering two possible workarounds if the
> core problem cannot be addressed:


No, privilege separation has nothing to do with this or the use (or not)
of network shares.  If part at least part of your goal in using 'ssh' is
secure connections, privilege separation makes sense.


> 1. Create a bash script that sets the same variables as they are set in
> Windows and dump it into /etc/profile.d. This though seems to have the
> disadvantage that it will need to be maintained and as they Windows
> environment variables may change would end up divergent.
> 
> 2. Create a bash script that extracts the Windows variables from the
> registry and resets them as needed and dump this script
> into /etc/profile.d. This has the advantage that it can automatically
> keep up with changes in the Windows environment variables.
> 

<snip>


-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019