Unless we talk about WLAN (WiFi) connections. So I'm going to not write about that here and guess you are talking about connecting to a Windows Share.
If you forgot all about your usernames and passwords you create new ones and add that user to the share. But I find folk getting lost on that. How about enabling the Guest account on Windows 7? Here's a link you can choose what you understand from.
https://www.google.com/#q=enable+guest+account+windows+7
I created a home LAN a few years ago, through my Win7 laptop, to include the laptop plus an iMac Yosemite. I was also able to use my Android tablet and Android smartphone on the LAN. Worked fine until I had to replace faulty hard drive on the iMac a year ago. The laptop appears to automatically log onto the LAN. But I can not seem to log onto the LAN from my iMac anymore. Although, both computers appear in the laptop's Win7 Network window!? Asks me for a p/w to log my iMac onto the LAN, but I have long forgotten it, or don't remember exactly what p/w its asking for anyway. Could it be asking for a HOMEGROUP p/w; or a WORKGROUP p/w; or a network p/w; or the router p/w; or what? The terms HOMEGROUP and WORKGROUP both seem to crop up!? It all seems so muddled and out of control now. I'm thinking maybe I should just delete the existing LAN and create a new one from scratch. But I don't know how to go about doing this. Any advice, or where might I find instructions on how to do this myself, i.e. remove existing LAN, and then create a new one? Thx.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic