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 username and password (in masked form) currently being used by the runtime client and attempt to authenticate the username and password.

-s

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

user_name

The username 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 username and password the client is sending to xfServer. Then, run synckusr on the server machine with the -p option. This will tell you which username and password xfServer is attempting to authenticate. You may find that there is more than one account with the same username across domains. If so, you may need to disable one of the accounts, change the username specification (in setruser) to include the domain or machine name, or create a different username to resolve the conflict. If multiple accounts are not the problem, verify that you have set the username 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 username. 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 username and password

To display the username 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 username; the -r option obtains the username from the client machine. This option also performs a look-up on the user account and attempts to authenticate it. This option returns the username 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 username 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 mmartin 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 look-up 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 username is found on the local machine:

RUSER not set. <mark> from GetUserName system call (implied RUSER)
No Password, account look-up 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 look-up and authenticate it, run synckusr on the xfServer machine with the -p option and specify the username 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 username and password enables you to distinguish between multiple accounts with the same username, 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 look-up and display where the username was found, run synckusr on the xfServer machine and specify the username 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 username xfServer will attempt to authenticate (log in); this can be useful if users have multiple accounts. (To actually authenticate the username, 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 username 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.

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.