We have a 3 year old Aussie who is very dominant and can be very unpredictable around people visiting our home. We watch him constantly because he will get behind them and nip at their thighs. With children he becomes nervous and will nip hands and arms. He has bitten my adult son when he becomes loud or is using tools that make noise. He is such a sweet guy otherwise, but it can be very nerve wracking when people visit. Locking him away doesn't seem to make sense because he will never learn positive behavior without exposure.
He knows the typical tricks: sit, stay, wait, "get off of me for crying out loud".