Re-apply initial user settings via server command

KB Home   |   Re-apply initial user settings via server command

There are situations in complex environments where users that move department, course or position, need to have their group membership changed. These changes under normal conditions do not evoke a reset of the user’s current rules or balances, requiring manual intervention on the administrators’ part.

Many of our Administrators have scripts to move a user across multiple systems and set their new permissions/conditions. Papercut is no exception to that rule.

This server command was created to allow administrators the flexibility to return a user’s properties to the same initial state as a newly created user via command line. Usage:-

re-apply-initial-user-settings <username>
           Re-applies initial settings to the user based, on group membership.
           <username> - the user’s PaperCut username.

To that end the Re-apply initial settings command was designed to give the admin the ability to script the same action as:

  • Clicking the “reapply initial settings’ link in the Action cetre of the users → details page.
  • Apply any group rules and settings the admins have set in the “new user settings “ section of the group details page
  • Re-Apply Initial Settings (advanced) from the Bulk User Actions-Reset statistics section.

When used in conjunction with the following commands

remove-user-from-group <username> <group-name>
add-user-to-group <username> <group-name>

It forms part of any complex user maintenance script to ease the workload of administrators.

For more information on using server commands, how to execute them see Appendix A of the PaperCut manual

For example: If you want to remove user “guest-user” from “Internal Users” group, then you can run the above command like this:

 remove-user-from-group guest-user  “[Internal Users]”

Categories: Scripting

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on September 24, 2015, at 05:03 PM
Printable View   |   Article History   |   Edit Article