Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log out a user from the server

Tags:

meteor

Is there any way to log out a user (or all users) from the server? Basically I'm trying to log out all users every time the meteor server starts up or restarts.

like image 461
knubie Avatar asked Jul 26 '13 03:07

knubie


People also ask

How do I force a domain user to log off?

Navigate to Computer Configurations > Policies > Windows Settings > Security Settings > Local Policies > Security Options. From the right pane of the console, select the Network security: Force logoff when logon hours expire policy. In the Security Policy Setting tab, select the Define this policy setting checkbox.

How do I kick someone off remote desktop?

Right-click the target connection and choose "Disconnect" from the context menu. Click "OK" to kill the session.

What is the difference between disconnect and log off?

If you disconnect from a remote desktop without logging off, applications in the remote desktop might remain open. You can also disconnect from a server and leave published applications running. You can log off from a remote desktop even if you do not have the remote desktop open.


1 Answers

You could clear up all the loginTokens which would force everyone to log back in

Meteor.users.update({}, {$set: { "services.resume.loginTokens" : [] }});

What this does is it clear's each users loginTokens so that they wont match up if the user tries to log in, then they would have to log back in. To alter who to target change the initial query (currently {})

like image 158
Tarang Avatar answered Oct 01 '22 02:10

Tarang