0

I have a raspberry pi box that I can SSH into, and sometimes I want to remotely lock pcs on my local network

Note: Do not mark this as duplicate, all ones require SSH on the remote and sometimes when my brothers are doing stuff they shouldn't on their computers, they wont install ssh.

Joyesh
  • 3
  • 2

1 Answers1

0

Can you run a command prompt, or execute a batch file somewhere?

If so, try these methods:

  1. rundll32.exe user32.dll,LockWorkStation

    However, it will keep the remote session open, and it's not recommended anyway.

  2. tsdiscon

    This will shut down the remote desktop connection and lock the screen.

Mark Buffalo
  • 138
  • 8
  • I can't start a command prompt on the remote pc, neither do I have the passwords, but my raspberry pi can run command prompt – Joyesh Nov 06 '15 at 18:55
  • So I'm confused. You can't start a command prompt on the remote pc, but your raspberry pi can do it? Could you clarify that, please? Are you trying to lock a computer you don't have access to...? – Mark Buffalo Nov 06 '15 at 18:56
  • Ok, I mean that my raspberry pi can run a terminal, but I can't get a terminal on the remote one – Joyesh Nov 06 '15 at 18:57
  • You have remote access to the other computers. What's preventing you from running a command prompt, or executing a bat file? You could put these commands into a .bat file and run them if you're able to execute something. Otherwise it doesn't sound like you have remote access - or you at least have very limited access. – Mark Buffalo Nov 06 '15 at 18:58
  • Well they're on the computers so its kinda hard, I want to lock them via the raspberry pi – Joyesh Nov 06 '15 at 19:00
  • Even if you lock them, they can just keep unlocking them. You might annoy them at best. If you aren't able to run those commands with Raspberry Pi on a command prompt, then you'll need to wait until they're off the computers to put a .bat file with either command *somewhere* they most likely wouldn't find it. You may even wish to set the file to `hidden`. – Mark Buffalo Nov 06 '15 at 19:02
  • Ok, then I guess there's no doing it, Might do the bat method – Joyesh Nov 06 '15 at 19:03
  • Keep in mind, `#2` will shut down your remote connection. – Mark Buffalo Nov 06 '15 at 19:05