Manual:InvalidateUserSessions.php

Details
invalidateUserSessions.php maintenance script invalidates the sessions of certain users on the wiki. After the session is invalidated, the users will be logged out from the browser/app.

If you want to invalidate all sessions, use $wgAuthenticationTokenVersion instead.

Options
Although both options are optional, either --user or --file is required to run the script.

Common errors
This error occurs when you try to use both options at once. You always have to use either --user or --file.
 * Cannot use both --user and --file

This error occurs when the file does not exist or the user running the script does not have permission to read the file.
 * Could not open $filename

If the file does exist, check the file permissions. If you are root user, then you can run script with sudo.