You won't be able to upgrade a CRM 4.0 database directly to CRM 2013. You'll need to first upgrade it to CRM 2011, and then upgrade it to CRM 2013.
During the import, you'll be asked to map users from the imported database to users in your local Active Directory.
So the steps are:
- Install CRM 2011 locally.
- Make sure all users are in your local AD.
- Import CRM 4.0 database.
- Map users.
- Upgrade local CRM 2011 to CRM 2013 (users will already be mapped).
Hope that helps!