login about faq

I'm running my server in a windows environment and when my clients make connections they land in the documents and settings\user area.

How can I change this? I can change it for sftp but not for terminal services connections?

How can I modify this so that the sftp home and terminal services home are the same?

Can I use the environment variables tab? If so watch attribute do I set? %UserProfile%, %Homedir%?

asked May 21 '13 at 22:11

jeff%20lee's gravatar image

jeff lee

Hmm... interestingly enough I didn't find this documented. However, I assume that the Windows remote access to command interpreter cmd.exe follows the way how remote terminal sessions work on Unix like systems. On Unix like systems the home directory of user is fully in hands of the operating system administrator. SSH Tectia Server on Unix machine just retrieves home directory as it is defined in the system and it cannot be overridden.

On Windows it seems to be similar, except Windows do not seem have clearly defined concept of a home directory. So SSH Tectia Server on Windows retrieves home directory as whatever is returned from call to GetUserProfileDirectory:

BOOL WINAPI GetUserProfileDirectory(
  _In_       HANDLE hToken,
  _Out_opt_  LPTSTR lpProfileDir,
  _Inout_    LPDWORD lpcchSize

It seems to me then, that if you want to change the folder which will be the CWD after login to SSH Tectia Server, you need to change the profile directory of the user account the user is logging into.

Or you may rather re-consider the solution you are trying to implement. I am afraid my answer didn't help you much.

With regards, Martin


answered May 24 '13 at 16:32

Martin%20Dobsik's gravatar image

Martin Dobsik

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 21 '13 at 22:11

Seen: 5,271 times

Last updated: May 24 '13 at 16:32

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.