I am new to ubuntu environment. i have set up an ubuntu 16.04 server and there are clients running ubuntu 16.04 in the network. I want to know whether it is possible to

shutdown all the clients at 5.30pm everyday automatically with a messagebox asking whether to shutdown or not from which they will select yes or no?

  • It's the "ask for ok" the tricky part. Do you mean with something graphical ? Jun 27 '17 at 14:19
  • yes i mean graphical @FedericoGalli
    – user237408
    Jun 28 '17 at 4:24
  • all the clients share the same user? or do you have a list of the users? do you have an user with sudo privileges on all clients? Jun 28 '17 at 10:33
  • i am using ldap authentication. i have an user with sudo privileges on all clients.@FedericoGalli
    – user237408
    Jun 28 '17 at 10:51

this is not a definite answer but rather a direction, its too long so can't go as a comment

1- as root try to type who -a , you should see which user is connected and what their pid is

2- then you can use wall to broadcast a message to user

now each client need to take action, therefore, you need a script on client machine that gets triggered with a broadcast (say everyday at 5:30PM), which then this client will send a message to the server to either kill the user/logout with specific pid or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.