Minecraft LAN won't work? [duplicate]

Solution 1:

The problem is that either the server cannot connect to Minecraft.net or that the person getting that error doesn't have a legitimate Minecraft account and so the server is refusing access.

The way to solve this is either to get all players a premium Minecraft account, or to change online-mode to false to stop it from checking the validity of the other account.

Solution 2:

You see, with online-mode set to true, the server tries to authenticate every player with the official Minecraft servers as they try to join.

You sound as if you're trying to play with no connection outside of your LAN, thus the server is failing because it can't find session.minecraft.net to authenticate the players.

By setting online-mode to false, you're telling to server to quit bothering trying to authenticate you and your friends with the mothership because you know it won't be able to find it, because you have no internet connection.