synckusr utility

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

 

 

The synckusr utility can be used to diagnose xfServer problems that are related to user account setup on Windows.

synckusr [‑h] [‑p] [‑r] [‑s] [user_name] [service_name]

‑h

Display usage information.

‑p

Authenticate the password for the specified user_name.

‑r

Display the user name and password (in masked form) currently being used by the runtime client and attempt to authenticate the user name and password.

‑s

Display the default file path for the specified service_name. Used with ‑p.

user_name

The user name to look up.

service_name

The name of the xfServer service for which you want to look up the default file path. Used with ‑s.

If there is an xfServer client connection problem, you may get this message:

Cannot log on user: <user_name>
Logon failure: unknown user name or bad password

To troubleshoot this problem, first run synckusr with the ‑r option on the client machine. This will tell you which user name and password the client is sending to xfServer. Then, run synckusr on the server machine with the ‑p option. This will tell you which user name and password xfServer is attempting to authenticate. You may find that there is more than one account with the same user name across domains. If so, you may need to disable one of the accounts, change the user name specification (in setruser) to include the domain or machine name, or create a different user name to resolve the conflict. If multiple accounts are not the problem, verify that you have set the user name and password correctly with setruser.

If files without a path specification are not going to the desired (or expected) location on the server, run synckusr on the server with the ‑s and ‑p options. This will display the default file directory for the specified xfServer service and user name. You can run the Synergy Configuration Program to determine the service name (the default service is SynSrv). To change the default directory, set the RSFILPATH environment variable.

To display the user name and password

To display the user name and password that will be passed through the client connection to xfServer, run synckusr with the ‑r option on the client machine. Do not specify a user name; the ‑r option obtains the user name from the client machine. This option also performs a lookup on the user account and attempts to authenticate it. This option returns the user name and password, along with the domain in which the account was found, the Windows security ID (SID), and, if the user is a member of the administrators group, that will display as well.

For example, on the client machine you’d enter

synckusr -r

Sample output when RUSER is set to a user name and password with setruser:

RUSER <mark> from HKEY_CURRENT_USER\Software\Synergex
Password is <\330T\301\313\312S\330I\305U\316\032l\343>
Computer Name SPIKE
Encoded User mark
Non Domain specified user pperkins Checking if part of local administrator's group(s)
Localized Admin user: Administrator Local Admin group: Administrators
User is part of Administrator Group
User account is found in domain: ABC_CORP
User SID is: S-1-5-21-516626026-640904803-9522986-1071
Account has been authenticated

Sample output when RUSER is set to SSPI with setruser:

RUSER <SSPI> from HKEY_CURRENT_USER\Software\Synergex (Windows authentication)
No Password
Windows authentication will be used when connecting to a Windows server

Sample output when RUSER is set in the environment:

<RUSER=mark> from environment
No password, account lookup and authentication not possible
User account is found in domain: ABC CORP
User SID is: S-1-5-21-1379799261-1886764798-3495251409-1195
Account has not been authenticated

Sample output when RUSER is not set, but the user name is found on the local machine:

RUSER not set. <mark> from GetUserName system call (implied RUSER)
No Password, account lookup and authentication not possible
User account is found in local computer: SPIKE
User SID is: S-1-5-21-487314201-320540311-1472111-1003
Account has not been authenticated

To look up and authenticate a user account

To perform a user account lookup and authenticate it, run synckusr on the xfServer machine with the ‑p option and specify the user name you want to look up. You’ll be prompted to enter the password. Synckusr will return the domain in which the account was found and the Windows security ID. If the user is a member of the administrators group, that will display as well. Running synckusr with the user name and password enables you to distinguish between multiple accounts with the same user name, but different passwords. Use this option if you are running xfServer in secure mode.

For example, on the xfServer machine you’d enter

synckusr -p Mark

Sample output:

User account is found in domain: ABC_CORP
User SID is: S-1-5-21-516626026-640904803-9522986-1071 

To look up and display the domain for a user account

To perform a user account lookup and display where the user name was found, run synckusr on the xfServer machine and specify the user name you want to look up. This is most useful if you are running in non‑secure mode; for secure mode, use the ‑p option. Synckusr will return the domain in which the account was found and the Windows security ID (SID). This will tell you which client user name xfServer will attempt to authenticate (log in); this can be useful if users have multiple accounts. (To actually authenticate the user name, use the ‑p option.)

For example, on the xfServer machine you’d enter

synckusr Mark

Sample output:

User account is found in domain: ABC_CORP
User SID is: S-1-5-21-516626026-640904803-9522986-1071 

To display the default file directory

To display the default file directory, run synckusr with the ‑p and ‑s options on the xfServer machine and specify the user name and service name. This will tell you the directory that files from that user without a path specification will be placed in. If the default file directory is set with RSFILPATH, it will also tell you where RSFILPATH is set (that is, server‑level, user‑lever, etc.).

For example, on the xfServer machine you’d enter

synckusr -p Mark -s SynSrv

Sample output when RSFILPATH is set for a specific instance of xfServer:

Password: *********
Default directory: <c:\Synergy\Data> from RSFILPATH in server Synrc (HKLM)
User account is found in local computer: SPIKE
User SID is: S-1-5-21-345376971-725947319-313073093-1007
Account has been authenticated

Sample output when RSFILPATH is not set and the default directory is used. This example shows the default directory on Vista.

Password: ********
Default directory: <C:\Users\Public\Documents>
User account is found in domain: ABC_CORP
User SID is: S-1-5-21-516626026-640904803-9522986-1145
Account has been authenticated
Note

If the user specified with ‑p has never logged on to the server machine, you will see “Key missing, account setup error…The parameter is incorrect.” However, the information about the default directory will then display correctly.