Home » Main » Adding aliases for usernames

Adding aliases for usernames

In some scenarios, a particular user wants to print a job but his/her username has been changed for various reasons and it is reflected in PaperCut now as a different username. Examples of why the username may have changed:

  • two networks/domains/servers have different naming conventions. e.g. for user, John Smith, one network uses the convention "j.smith" while the other uses "jsmith"
  • for some policy reasons, the format of usernames has changed and you want to allow forgetful users to log in with their old name.
  • Unix has strict requirements for usernames, (IEEE Std 1003.1-2001), where the only valid characters are letters, digits, underscores, full stops, at-signs, dashes (but not start with a dash) and having $ at the end. So when printing on a Unix server, it can sanitize the username, such as converting an apostrophe into an underscore, and then recording in PaperCut as a different user when one really wants it to be the same user.
  • Print jobs are coming from a ERP or mainframe system where their usernames are different than in their other network.
  • Print jobs coming from some software packages may use the "application username" and not the users' network username used by PaperCut. e.g. this can occur in some SAP configurations.

What can one do?

To workaround this problem PaperCut allows users to have a list of aliases for their username. So John O'Hare can have username aliases of "john_o_hare", "johnohare", and "johare". The aliases information is kept in a file,

  [app-path]\server\data\conf\username-aliases.txt,

and can be created based on the provided template file,

  [app-path]\server\data\conf\username-aliases.txt.tmpl.

For example on Windows:

  • Go to the directory of C:\Programs\PaperCut NG\server\data\conf
  • Run Notepad or your favorite text editor on the file username-aliases.txt.tmpl
  • Add the following lines to the end:
        johno'hare: john_o_hare
        johare:     john_o_hare
  • Save file as username-aliases.txt

The format of the alias file is:

aliasname1: username1
aliasnameA: username2
aliasnameB: username2

where aliasname is mapped to username in the system database. A user may have multiple aliases. In this example, username2 is known both as aliasenameA and aliasnameB. The separator between aliasname and username can be ":", "=" or tab.

At what level is the alias applied?

The username aliases are applied at the following levels:

  • User login to the web interface, client popup authentication, or release station login.
  • Print jobs arriving in the print queues under the alias name.

What happens if the username does not exist in the alias file?

If a username does not match in the alias file it's assumed the user is a standard username. If the user is new to the entire system it will be managed as a new user account and automatically created in PaperCut as per your new user rules defined under the groups section (group level initial user creation rules). For this reason you should take care to ensure your alias list is current and up-to-date.


Categories: Users


keywords: ERP, mainframe, SAP, lookup, look-up, map, translate, unix

Page last modified on March 26, 2012, at 05:44 AM

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.