RUSER
WSupported on Windows
|
USupported on Unix
|
|
NSupported in Synergy .NET
|
The RUSER environment variable specifies a client/server username.
Value
One of the following:
Pass the specified username and optional password to the server. (On Unix, if you are copying and pasting onto the command line or inside a script or .profile file, this must be in single quotes to ensure no command substitution occurs.)
(Windows) Tell xfServer to use Windows authentication to impersonate the client connection.
Discussion
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:
On |
Do this |
---|---|
Windows |
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: set RUSER="setruser_value"
|
Unix |
Run the setruser utility, and set RUSER to the string that setruser generates: 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 single 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.)
To test that RUSER is set correctly, you can echo the value to the screen: On Unix, echo $RUSER On Windows, echo %RUSER% You should see the string you assigned, with all special characters intact. For example, appuser/\335\215\032\040\326\215\025\225\057\250K\007\353 On Unix, if you forgot to enclose username/password in single quotes, it may (incorrectly) look something like this: appuser/335215032040326215025225057250K007353 |
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. |
Used by
Runtime, xfServer, compiler, fcompare, fconvert, isutl
See also
Examples
Windows
The following example runs the setruser utility, which sets RUSER for the current user in a Windows registry entry.
setruser
The example below 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"
Unix
The following example passes the username John, without a password, to the server.
RUSER=John ;export RUSER
The following example 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
The example below passes the username Mark and the password \231\251o\2451p\228x to the server.
RUSER='Mark/\231\251o\2451p\228x' ; export RUSER