You can cash or deposit a check with someone else's name on it as long as the person who's name is on the check endorses the check over to you to cash or deposit.
To endorse a check over to someone else to cash or deposit write in the endorsement area "pay to the order of" and then put the persons name below the pay to the order of.
And then sign your name underneath and give the check to the other person to cash or deposit.
And then you'll have to sign your name in the endorsement area as well.