There is no way to edit a record owned by an inactive/terminated user, this presents a huge problem when performing any kind of Mass Update. The only solution is to reactivate the user id, update the records, and then deactivate the user id (methinks that might be just a wee bit of a Security Breach). This is further complicated if the records are owned by multiple inactive/terminated users, because unless you have unused licenses available you must temporarily disable active users, and "swap" their licenses with the inactive/terminated users
For the record, my org is hitting the same wall when trying to merge old contacts: cases owned by the "victim" contact can't be moved to the "survivor" contact if the case owner is an inactive user
Rowcause is editable only for custom objects not for standard objects.
All you can do is, you can create a share record in the accountshare table however you can't set value to the row cause.
Salesforce standard Share objects like AccountShare,OpportunityShare...etc will not have write access on RowCause field.
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
https://sites.secure.force.com/success/ideaView?id=08730000000BqhE
For the record, my org is hitting the same wall when trying to merge old contacts: cases owned by the "victim" contact can't be moved to the "survivor" contact if the case owner is an inactive user