I'am facing an issue : the company i work for want to change the way users log on their windows PCs, right now, they are using their family names. But in some weeks, they'll have to log with a standardized userid, something like xyz123456.
I am quite sure that it will cause an issue when using alfresco. How can I update alfresco's database so that the new username is used ?
as Mike has said, changing user names is not supported from an Alfresco perspective (running system, using any Alfresco service).
You could update the information in the database, but this requires quite a bit of engineering. You would have to
update the userName property value of every person node in ALF_NODE_PROPERTIES update the child association name and CRC for child associations to person nodes in ALF_CHILD_ASSOC update all text property values for properties that contain user name references (modifier, creator etc.) in ALF_NODE_PROPERTIES update all userName based authority names / references in the ALF_AUTHXY tables update all actor id and user references in jBPM tables (swimlanes, pooled actors, variables etc.) completely rebuild the Lucene indices probably do some other things I currently can not think of
This is of course if you want to be thorough and avoid any unpleasant surprises later on. My advice: Do not attempt this, unless you have some serious expertise in both low-level Alfresco data structures and your indiviual busines content model at your disposal.
Instead of an all out rename and reuse of the existing user accounts, I would aim for a transition. You could re-synch with the domain after switch to new user names, have the old synched accounts archived (prevent deletion through re-synch) and migrate content ownership, group memebership, task assignment and maybe preferences/dashboard configuration to the new user (policy or patch based). What will be difficult to migrate are individual permission grants to singular people - that's why I always strive for group/role based access control.
There are several options, but all come with trade-offs - either through effort/cost or reduced consistency / historic traceability.
(Un)fortunately, I have not been able to test some of my ideas for this matter in real life projects - at the moment, they are just theoretical options.
We really need a better way to manage these changes. Our user IDs change for users who change their name through marriage, etc. and the way Alfresco currently handles this situation when synching users with Active Directory, their content, sites, memberships, etc. all disappear, because the old user ID no longer exists in Active Directory.
Are there any scripts that could be used to restore a users' content/site memberships under the new user ID once this happens?