Calling server-command from a remote system
The scripting tool provided with PaperCut called server-command is a very powerful utility that provides access to dozens of scripting server operations ranging from:
It's often used by administrators in simple scripts such as batch files, shell scripts, or via languages such as VBScript, Python, Perl or Ruby. You can read more about this here:
server-command is a local program and must be run directly on the PaperCut server as a privileged user (for security reasons). The server command may however be called remotely using standard remote command tools. Options include:
Use psexec.exe - a remote command program provided by the Sysinternals team at Microsoft. Example use:
psexec.exe \\papercutserver "c:\Program Files\PaperCut NG\server\bin\win\server-command.exe" disable-printer printsrv1 labprinter -1
Use SSH - a secure remote command/shell program. SSH can be run non-interactively in scripts with the use of an authorized public key added under the papercut account's ~/.ssh/authorized_keys list. Example use:
ssh papercut@papercutserver "/home/papercut/server/bin/linux-i686/server-command disable-printer printsrv1 labprinter -1"
Categories: Scripting