Client/server username

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX


The RUSER environment variable specifies a client/server username.

One of the following:


Pass the specified username and optional password to the server.


(Windows) Tell xfServer to use Windows authentication to impersonate the client connection.


The RUSER environment variable is used to implement RUSER security with xfServer. The value of the RUSER environment variable (or registry setting) defines the user credentials (username and password) passed to xfServer via the client. The server session created impersonates that user. When specifying a password, xfServer expects it to be in the form returned by the setruser utility.

On Windows, the most common way to set RUSER is in the registry via the setruser utility. RUSER set in the environment overrides RUSER set in the registry.


To test where RUSER is set on Windows, run the synckusr utility as follows:

synckusr -r 

This command displays the username and password in masked form (for example, \261j\263W\256j). More importantly, it specifies which RUSER setting the runtime client uses.

Set RUSER as follows:


Do this


To set RUSER in the registry, run setruser to create a Windows registry entry for the current user (in HKEY_CURRENT_USER\Software\Synergex) or setruser -g to set RUSER in a global registry location (HKEY_LOCAL_MACHINE\Software\Synergex) so that multiple users on a single machine all have access to the value.

To set RUSER in the environment, run setruser -n, and set RUSER to the string that is generated:



Run the setruser utility, and set RUSER to the string that is generated:

RUSER="setruser_value" ;export RUSER

This command sets RUSER for the current log-in session. To set RUSER for every subsequent log-in session by this user, you can redirect the output from setruser to a file using the following command:

setruser >filename

Then, place the output in your .profile file as follows:

RUSER="setruser_value" ;export RUSER

(Make sure you include the quotation marks.)

For a list of options to the setruser utility, see setruser utility.

On Windows, an RUSER value of SSPI (all uppercase) instructs xfServer to use Windows authentication. You can set RUSER to this value by specifying “SSPI” as the username (with no password) when prompted by the setruser utility. The only time you might need to do this is if you need to override a global RUSER (registry) setting set with setruser -g. (Normally, however, you can just run your Windows server in Restricted mode.)

Setting location


Do not set RUSER in the synergy.ini or synuser.ini file.

The environment and/or the Windows registry on Windows and the environment on UNIX. If RUSER is set in both the HKEY_LOCAL_MACHINE\Software\Synergex and HKEY_CURRENT_USER\Software\Synergex locations of the registry, the HKEY_CURRENT_USER setting takes precedence. If RUSER is set in both the environment and the registry on Windows, the setting in the environment takes precedence.


When RUSER is set in the Synrc node in the registry, as is required when configuring xfServerPlus for remote data access, it is read into the environment when rsynd starts up, and it is therefore considered to be set in the environment.

RUSER only needs to be set on the client.


If you use the SETLOG routine to set RUSER, only the current thread and newly created threads are affected. Prior threads are not changed.

Runtime, compiler, fcompare, fconvert, isutl


The following example on Windows runs the setruser utility, which sets RUSER for the current user in a Windows registry entry.


The following example on Windows passes the username Mark and the password \231\251o\2451p\228x to the server. (You would first need to run setruser -n to display the encoded password string to the screen. )

set RUSER=Mark/\231\251o\2451p\228x

The following example on UNIX passes the username John, without a password, to the server.

RUSER=John   ;export RUSER

The following example on UNIX is an automated process that, as a result of using the accent grave characters (`), invokes setruser, assigns the output to RUSER, and exports it. (When setruser is invoked, it prompts you for a name and password. The name and password you type are immediately and automatically assigned to RUSER, with no cutting and pasting required.)

RUSER=`setruser`    ;export RUSER