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]

Windows environment variables in ssh sessions with privilege seperation

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.

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:

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.

Any comments, pointers or suggestions on either the problem or the
possible workarounds is appreciated.

Sanitized cygcheck output is attached.

Sean Morgan
Schrodinger Inc.

Attachment: cygcheck.out
Description: Text document

Unsubscribe info:
Problem reports:

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