Re-apply initial user settings via server command

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

Main.ReApplyInitailUserSettings History

Hide minor edits - Show changes to output

Changed line 22 from:
Attach:Reapplyviabulkuseraction.png
to:
->Attach:Reapplyviabulkuseraction.png
November 27, 2018, at 10:06 PM by Priyanka - Added a screenshot of bulk user actions page, displaying the setting
Added line 22:
Attach:Reapplyviabulkuseraction.png
November 27, 2018, at 10:01 PM by Priyanka - Clarified the information about this option displayed in the admin interface
Changed lines 17-19 from:
*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.
to:
*Clicking the “Re-apply initial settings’ link in the @@Actions@@ section of the User Details page. (Users -> [Name of the user])
*Apply any group rules and settings the admins have set in
the “New user settings “ section of the group details page. (Groups -> [Name of the group)
*Re-Apply Initial Settings (advanced)  from the @@Bulk User Actions->Reset statistics@@
section.

Changed lines 24-25 from:
--->@@remove-user-from-group@@
--->@@add-user-to-group@@
to:
--->@@remove-user-from-group <username> <group-name>@@
--->@@add-user-to-group <username> <group-name>@@
Added lines 29-31:

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]"@@
December 09, 2014, at 02:32 AM by Shane Higgins -
Changed lines 24-26 from:
->@@remove-user-from-group@@
->@@add-user-to-group@@
to:
--->@@remove-user-from-group@@
--->@@add-user-to-group@@
December 09, 2014, at 02:31 AM by Shane Higgins -
Added lines 1-30:
(:title 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@@
->@@add-user-to-group@@

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 [[https://www.papercut.com/products/ng/manual/apdx-tools.html#apdx-tools-server-command |Appendix A]] of the PaperCut manual

''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 November 27, 2018, at 10:07 PM
Printable View   |   Article History   |   Edit Article