Reboot User's workstation

Hi Gurus,

I'm trying to write a script right to reboot all my user's workstation over this weekend.

I'm kind of stuck here right now. I know the command to reboot ie init 6 but how to include all the users in my script?

thanks

wee :slight_smile:

If you know the workstation IPs/hostname ; you can use rsh command. Iam not sure but you can try.

This is how my script will look like

#!/bin/ksh

> /tmp/rebootip

for i in `cat /tmp/ip` --> this is where all the user's ip address will be stored
do
if [ "`ping $i 1 | grep alive`" != "" ]
then
echo $i >> /tmp/rebootip
fi
done

    for i in \`cat /tmp/rebootip\`
    do      

sync
sync
sync
init 6
done

is this correct? or i need to use rsh to remotely log in to reboot? thanks samsam :slight_smile:

wee