It is a scam. If you look in the "Related" column on the right side of the page you'll many similar questions. In some cases the scammer will ask for the login info, but in other cases they won't. The risks of giving someone your bank login and password are obvious. Banks almost always require that you keep your password a secret as part of their terms of service. This means that the bank is not going to be sympathetic if you tell them you got robbed by someone you gave your password to.
Even if they don't ask for a password, it's still a scam. The scam works by taking advantage of the fact that different parts of the banking system operate at different speeds. The scammer sends you a forged or stolen check, and you deposit it in your account. Check processing is very slow! It may take over a month for the bank to determine that the check was bogus. In the meantime the bank will generally make at least some portion of the funds available to you after a few days. You are, after all, a valued, honest, customer.
The scammer will then ask for a portion of the money back, sometimes a surprisingly small portion. They will have you transfer the money to them using cash, a gift card, a bank wire, Bitcoin, or Western Union. The point being that unlike a bad check, the transfer to them will be quick and irreversible. When the bank finally figures out that the original deposit was a fraud, the bank will hold you responsible for the full amount of the original deposit including whatever you've already spent yourself, and the portion you transferred back to the scammer.
But wait, you say! What if I never send the scammer the money they ask for? Remember, the whole point of this scam is that the check is bogus! The scammer is not out any money if you don't send them their cut. They just move on to their next victim, and you still have to pay the bank back for any of the money you spend from the bad check.
The number of people in the world who will contact strangers or near-strangers to give away cash is essentially zero. Unfortunately, there are millions of people in the world who willing to prey on the greedy, the gullible, and the desparate.