How to change the value for AD account usernames on Shares

Description

When you have Shares connected to an Active Directory database, by default the usernames taken from the AD are in the pre Windows 2000 format.

It may be the case that you want the more current AD username format to be used instead. You can change the value taken from AD by modifying a few lines in a Shares file.

Instructions

1. The file you need to edit is the following:

  • Linux: /opt/aspera/shares/u/shares/lib/authentication/server/directory/active_directory.rb
  • Windows: C:\Shares\www\lib\authentication\server\directory\active_directory.rb

Make a backup of the file before making changes:

Linux:
cp ../active_directory.rb ../active_directory.rb.bak

Windows:
copy ..\active_directory.rb ..\active_directory.rb.bak


2. Open the file in a text editor and locate the following lines:

def user_search_attribute
 :sAMAccountName
end

def user_name_attribute
  :sAMAccountName
end


sAMAccount refers to the attribute for pre Windows 2000 username formats. To change this to the newer AD username format, you would replace these values with the userPrincipalName attribute:

def user_search_attribute
 :userPrincipalName
end

def user_name_attribute
  :userPrincipalName
end


Save the file.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk