A few travellers have used banks to change money. This is a mistake as the banks will buy your foreign currency at a much lower state rate but will never sell you hard currency at that rate if you are left with the fast devaluing Iranian Rial, in fact the banks never sell hard currencies to anyone let alone foreigners so you lose out if you go to a bank! There are official bureau de changes where you can sell ( and only sometimes buy) your currency at the market rate. You can find them in most city centers as well as international airports. You do not need Iranian Rials to enter Iran, USD and Euros are readily exchangeable in Iran.
Update September 2018
The currency situation is very unstable at the moment. The US dollar has gone up from 42000 Rials to 1 USD this summer to over 130000 Rials per 1 USD ( the euro being around 150.000 Rials per 1 euros at the time of this going to the press!!)
The advice is to exchange little by little.
The official bureau de changes which were closed down during the summer have resumed their activities somewhat but most are not selling hard currencies, they only buy them. As a result there are many middle men lingering around touristic places offering an exchange service.
Update February 2019
Banks have resumed buying and selling currencies. They are now competing with the bureau de changes, but as the sanctions continue and the economy is still unstable the advise is still to exchange little by little and check the rates. Unfortunately the websites indicating the rates are in Farsi but here is one