OS: Windows Server 2008 Web Edition
WinSSHD version: 5.05
Client: WinSCP 4.1.7
Windows Server 2003:
Mount point for a Windows group (local) is D:\...\%username%. When I connect using test_user, %username% is "test_user", and the mount point becomes D:\...\test_user.
Windows Server 2008:
Mount point for a Windows group (local) is D:\...\%username%. When I connect using test_user, %username% is "SYSTEM", even though the process SftpServer.exe is running as "test_user". The mount point becomes D:\...\SYSTEM.
Is there a way to make WinSSHD on Windows Server 2008 work the same way as on Windows Server 2003?
So, %USERNAME% has the right value if you login to Windows 2008 locally.
1) Could you check the %USERNAME% value in SSH terminal on Windows 2008? If you are using Tunnelier then login to WinSSHD on Windows 2008, click Open New Terminal Console and execute set USERNAME there.
2) Do you execute and programs with WinSSHD On-Logon command facility when logging on this test_user? If yes, could you please paste the On-Logon settings from WinSSHD file log?
I'm completely unable to reproduce this problem on Windows 2008 Enterprise server (x64 and x86)...
set username gives me test_user in terminal console, but the SFTP window that opens by default uses SYSTEM.
But I discovered something:
As long as the Tunnelier connection is open, SFTP works with both Tunnelier and WinSCP. The SFTP window that opens by default when using Tunnelier uses the wrong user (SYSTEM), but if I close it and click "Open New SFTP Window" it uses test_user.
There seems to be a problem with when WinSSH uses %USERNAME% during the startup of the connection. Do you have any more knowledge about this?
OK, I have managed to reproduce exactly the same chain of events on x64 Windows 2008 acting as a domain controller.
What I did is open Control Panel - System - Advanced system settings and - Environment variables; here I've added System variable USERNAME=SYSTEM. Exactly as in your case, %USERNAME% was initially set to SYSTEM for the first SFTP session, but moments after it got magically reset to hold the actual username.
Oddly enough, on x86 Windows 2008 (also acting as domain controller) the manually set USERNAME=SYSTEM stayed that way for the whole SSH session duration.
Therefore, open Environment variables and check if there's a USERNAME System variable declared there. If yes, delete it. Also check User variables for test_user account as well (you will need to logon to that account to see its user's variables).
This topic is archived. No further replies will be accepted.Other recent topics