-
Notifications
You must be signed in to change notification settings - Fork 781
SSH, SFTP Not following user's home directory #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is there any progress or update on this? Having this same issue in Server 2012. |
Same problem here, Windows Server 2012. A fix would be really appreciated. |
Is there any way to get this more attention? |
It's been a while. Is a fix for this forthcoming? |
I tried to update the User's Home directory in User Properties under ADUC as the following,
|
I have the same problem. I also tried to use mklink to create a junction to link user's home directory (C:\Users[username]) to a different location (c:\sftproot[username] for example). For some reason it worked the first time when I connect, but subsequent tries landed me in C:\Windows\ for some reason... |
Coming up on two years old, any progress? Does anyone have a work-around that works? |
Home directory of the user is pulled from registry Can you please add details on how exactly home directory is being configured for a local user? |
manojampalam - MS Documentation: or as i scripted it: |
OK Thanks. Currently, we store user's ssh configuration under user's profile, on the assumption that it would be deleted once the user account is gone (note that it will contain sensetive information like user's keys). Getting "homepath" on board will lead to confusion down the line, should ".ssh" be stored under user's profile directory or "homepath". What should "~" resolve to ? What about user's other libraries - pictures, videos... that are found under profile directory (by default). Thoughts? |
I would model it exactly how FTP(S) User Isolation is configured now (via IIS), admins familiar with FTP can apply the same mental logic to ssh configuration. Or dont reinvent something that has been solved in a similar manner with cygwin, use that as a model to define your user isolation too, i think its defined in etc\passwd file which is their user configuration file. This too would help with understanding by using similar configs. |
Will take a look at how FTP in IIS works. I want to point we would like to be as close as possible to how OpenSSH works on Unix. OpenSSH currently ends up creating the user's profile if user has logged on for the first time (via ssh). We ought to have a default user directory because that's what OpenSSH core code assumes and relies on. And we prefer this is something that automatically gets cleaned up when user account is deleted. |
Makes sense, I dont have a Unix background. Keep after it, I think a good implementation of user isolation is a crucial piece of Win32-SSH. |
Hi, Shall I understand that the registry key mentioned "ProfileImagePath" is used only by OpenSSH and we can set it up to point to a different directory ? |
Not sure if this is the right place to mention, but it is inherently risky to use the %userprofile% for anything since there are long running windows 10 bugs about it creating "temporary user profiles" and using it indefinitely or at weird inexplicable times. (I can't even find explanations on the internet about when and why it makes temporary user profiles) This terrible workaround probably only works for a single user scenario:
In my case windows created a c:\Users\TEMP.hostname and started using it persistently |
Good afternoon,
If I connect to server through ssh or sftp (using user/pass), the default/home directory is c:\users\test2.
If I log into the server locally and opening a cmd prompt, the default directory/home directory is c:\test2home.
Thanks,
~Tim
The text was updated successfully, but these errors were encountered: