On the host system (where the share is located), you create a user account with password. Then you use that username/password on the remote system... For example, Computer2 is the server (the location of the share), Computer1 is the client. You create an account on Computer2 called Account2. On the client, you connect to the share and the username you use is Computer2\Account2. If you only type Account2, the client will "send" Computer1\Account2 and if the server does not know what Computer1 is, then it will reject the credentials.
Alternatively, I believe that you can add accounts from other computers to share permissions, but I don't remember if a password is required. To do that, you would add Computer1\Account1 on the server side and it will recognize that user. I don't remember if adding that to the share/permissions is enough or if you have to add it to Users as well.