While trying to figure out a way to set a security token for an organization today, I was going through profile settings and accidentally selected API only user and was kicked out of Salesforce with insufficient privileges. I have seen other questions addressing this but the solution is always to login through dataloader (or something similar) to making changes there. Since I do not have a security token, I am not able to login to dataloader. Are there any other solutions!?!?
Sometimes, you can still login with the Force.com IDE. It doesn't hurt to try. If you can, you can then download the admin profile, update the settings, and you'll be good to go. Make sure you're logging in from inside the corporate network or another location listed on your Network Access list.
If you have Premier Support, call the Premier Support line, and request that the profile be updated by them. They have administrative logins they can use to fulfill your request.
According to 4627, if you've only got one administrator, and that administrator can't login, and all other client options have been exhausted, you can send a letter granting permission to change the system administrator. While it implies that only an email address can be changed, this is not true. Technical Support can remove Login Hours, Login IP Ranges, Single Sign On, Permanent Lockouts caused by too many failed login attempts, and other permissions that can restrict administrative login access.
Not-for-Profit (NFP) Orgs
NFP Orgs can contact the Salesforce Foundation for assistance, as technical support doesn't normally handle NFP orgs (at least, not last time I was involved with an NFP).
Partner Portal/ISV Developer Org
If the org in question belongs is a Developer Edition used by a partner, you can appeal to Partner Support to have the org modified. This would be necessary because Developer Edition accounts can't normally be modified by technical support, but the Partner Support team would probably do so if a partner were no longer able to update/sell their product because of this condition.
If this is a simple Developer Edition, you're probably out of luck. There's no known process for any arbitrary developer to get back in to an org they're permanently locked out of for any reason. You'd have to create a new org from scratch. Hopefully, you've backed up your metadata.