The 30-year-old will play for the Red Rebels next season, the club have announced.
Greaves knows United are going to be a young side again next season but O’Halloran can help guide the squad.
The ex-Salford, Stockport and Aston Villa centre-back is unlikely to be the last new arrival at Broadhurst Park.
Greaves told the United website: ‘I’m over the moon to capture the signing of Stephen, he’s is a player who again comes in with bags of experience.
“He’s had experience of the Premier League and also on the international stage. A defender who can play down the centre or the left side will be a huge asset to us both on and off the field.
“Stephen is a player who the younger lads in the squad will learn a lot from, he’s a winner with a great attitude and exactly the type of player we are trying to bring.”