[cvsnt] Problem with embedded spaces in XP local user name?

Dan Hoyt dhoyt at tsc.com
Tue Jul 27 23:16:38 BST 2004

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

I just installed cvsnt v2.0.41a client (included with WinCVS 1.3), and I cannot connect from an XP machine to a Solaris cvs store.  I get the error:

>cvs status: rsh server reported: permission denied
>cvs [status aborted]: Connection to server failed
This works perfectly fine for my coworkers, but not for me, which leads me to believe that it is a problem with the local user name in XP, as the only difference I can find is that my XP login is different than my userid on the Solaris box (with the cvs store), and my coworkers have the same login name on XP and Solaris.  I ran across this same issue with cvs v1.11.5, which provided the following, more descriptive error message:

>cvs status: cannot log in as local user 'Dan Hoyt', remote user 'dhoyt'
>cvs [status aborted]: Permission denied by rshd

Unfortunately, because my local user ID has embedded spaces (XP *suggests* your full name with spaces on installation, and I didn't know that it would create a user profile from the name), I couldn't just add the local ID as another remote user on Solaris.  The public documentation was no help at all, but I found the solution for this error buried in the source code.  In windows-NT/pwd.c ("Try to approximate UN*X's getuser...() functions under MS-DOS."):


/* where people might scribble their name into the environment ... */

static char *login_strings[] =


"LOGIN", "USER", "MAILNAME", (char *) 0


/* return something like a username. */

char *

getlogin ()


/* This is how a windows user would override their login name. */

if (!login)

login = lookup_env (login_strings);

/* In the absence of user override, ask the operating system. */

if (!login)

login = win32getlogin();

/* If all else fails, fall back on Old Faithful. */

if (!login)

login = anonymous;

return login;


Thus, I was able to "fix" this problem by adding an environment variable "USER=dhoyt".  

However, I cannot resolve this with cvsnt.  Are these login name hacks supported by cvsnt?  Or is there some other, undocumented way of resolving this issue? 

-Dan Hoyt
Senior Systems Architect
Technology Service Corporation

More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook