Two options: ply:ReadMind() or ply:GetSocialSecurityNumber().
With the former you can identify whether the player has used family sharing with the intent to evade bans.
With the latter you can check if it’s the same person you banned before. Use it as an identification rather than steam id.
You want to identify the difference between whether someone is using family sharing with one intention or the other. That simply cannot be calculated. You can only have the computer guess and accept that mistakes will be made.
Have an example:
For every ban store the ip. Ban anyone using family sharing with a banned steam id.
Alternative: ban anyone using family sharing where the family shared steam id is banned.
The ban will * probably* be appropriate, but what if the player was steam sharing with their sibling or parent? Is it right to say a ban is linked to an account/ip and not necessarily the person using it?
Consider this rare, but possible use case:
Harry is a super minge prop killing everyone in sight in every server. After years of doing that he gets bored of gmod. Since he only has gmod, he gives the account to his little brother Larry by giving him the username and password. When Larry tries to play online he finds he’s banned from many servers.
Is it right to assume same account = same person? You have to make that assumption when banning on steam id. Is it right to assume the same thing with a family shared account? It might be, but there may also be serious objections.
Ask yourself this: how disastrous are the consequences if an innocent player gets banned from a server because the steam family sharing parent account is banned?
I usually say punishing the innocent by script is capital sin (E.g. Prop kill detection, anti cheat ban while allowcslua=1,etc.)but I must admit that this is an interesting use case.