It's likely that Riker had offended a superior or two with his attitude. As the Pegasus Admiral said to Picard, not everyone likes an underling that disobeys their orders. Sure, the Pegasus Admiral (I forget his name) was a bad one, but he had a point.
you mean Admiral Eric Pressman. Not Really. That guy broke Federation law in regards to the Pegasus' cloaking device which was illegal under the Treaty of Algeron because in that episode you can very clearly see that Riker wants to tell the truth to Picard but Pressman orders him not to until he's eventually forced to tell Picard the real truth later on in the episode. The most that Riker probably got after that incident was just a possible reprimand and a slight mark on his service record but he still remained as a commander while Pressman was more than likely thrown out of starfleet and lost his career which he deserved.